1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Fix scripts for instances which have been upgraded from Owncloud

This commit is contained in:
Jimmy Monin 2016-09-25 22:20:19 +02:00
parent 6adad2ed04
commit 9941aad804
4 changed files with 10 additions and 10 deletions

View file

@ -6,8 +6,8 @@ set -eu
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
# Set app specific variables # Set app specific variables
dbname=$app dbname=`sudo cat /var/www/$app/config/config.php |grep dbname|sed "s|.*=> '\(.*\)'.*|\1|g"`
dbuser=$app dbuser=$dbname
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -5,8 +5,8 @@ source ./_common.sh
# Set app specific variables # Set app specific variables
app=$APPNAME app=$APPNAME
dbname=$app dbname=`sudo cat /var/www/$app/config/config.php |grep dbname|sed "s|.*=> '\(.*\)'.*|\1|g"`
dbuser=$app dbuser=$dbname
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -5,10 +5,6 @@ set -eu
# Get multi-instances specific variables # Get multi-instances specific variables
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
# Set app specific variables
dbname=$app
dbuser=$app
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -54,6 +50,10 @@ sudo cp -a ./www "$DESTDIR"
sudo mkdir -p "$DATADIR" sudo mkdir -p "$DATADIR"
sudo cp -a ./data/. "$DATADIR" sudo cp -a ./data/. "$DATADIR"
# Set app specific variables
dbname=`sudo cat /var/www/$app/config/config.php |grep dbname|sed "s|.*=> '\(.*\)'.*|\1|g"`
dbuser=$dbname
# Create and restore the database # Create and restore the database
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass" ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ./db.sql ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ./db.sql

View file

@ -7,8 +7,8 @@ source ./_common.sh
# Set app specific variables # Set app specific variables
app=$APPNAME app=$APPNAME
dbname=$app dbname=`sudo cat /var/www/$app/config/config.php |grep dbname|sed "s|.*=> '\(.*\)'.*|\1|g"`
dbuser=$app dbuser=$dbname
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers