diff --git a/scripts/backup b/scripts/backup index 58a7016..419c0d3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -7,7 +7,7 @@ set -eu backup_dir=$1 # The parameter $2 is theid of the app instance -app=$2 +app=$YNH_APP_INSTANCE_NAME # Source app helpers source /usr/share/yunohost/helpers diff --git a/scripts/restore b/scripts/restore index a646aaa..daccfe9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -8,7 +8,7 @@ set -eu backup_dir=$1 # The parameter $2 is the id of the app instance ex: ynhexample__2 -app=$2 +app=$YNH_APP_INSTANCE_NAME # Source app helpers source /usr/share/yunohost/helpers diff --git a/scripts/upgrade b/scripts/upgrade index 554a594..0462912 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,8 +33,8 @@ db_name=$app CHECK_MD5_CONFIG "connect.php" "$final_path/config/connect.php" # Created a backup of the config file if it was changed. # Modify Nginx configuration file and copy it to Nginx conf directory -sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf* -sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf* +sed -i "s@__PATHTOCHANGE__@$app@g" ../conf/nginx.conf* +sed -i "s@__FINALPATH__@$final_path/@g" ../conf/nginx.conf* if [ $is_public = "Yes" ]; then