mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge 9941aad804
into 134f67d2a0
This commit is contained in:
commit
4b77c66b42
4 changed files with 10 additions and 10 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
@ -57,6 +53,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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
# Backup the current version of the app, restore it if the upgrade fails
|
# Backup the current version of the app, restore it if the upgrade fails
|
||||||
if sudo yunohost backup list | grep -q $app-before-upgrade > /dev/null 2>&1; then # Supprime l'ancienne archive seulement si elle existe
|
if sudo yunohost backup list | grep -q $app-before-upgrade > /dev/null 2>&1; then # Supprime l'ancienne archive seulement si elle existe
|
||||||
|
|
Loading…
Add table
Reference in a new issue