From 0af43ec257525a4126c64231ed2a853811d326f1 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Wed, 22 Feb 2017 02:39:06 +0100 Subject: [PATCH] Inclure le fichier .fonctions --- scripts/upgrade | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 55202b9..db8f0f7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,6 +3,8 @@ # Exit on command errors and treat unset variables as an error set -eu +source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script + # See comments in install script app=$YNH_APP_INSTANCE_NAME @@ -30,6 +32,8 @@ final_path=/var/www/$app db_name=$app +CHECK_MD5_CONFIG "connect.php" "$final_path/config/connect.php" # Créé un backup du fichier de config si il a été modifié. + # 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* @@ -37,13 +41,6 @@ sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf* if [ $is_public = "Yes" ]; then sudo cp ../conf/nginx.conf-public /etc/nginx/conf.d/$domain.d/$app.conf - # grep -q "define('FORCE_SSL_ADMIN', true);" $final_path/config/connect.php - # if [[ ! $? -eq 0 ]]; - # then - # echo "define('FORCE_SSL_ADMIN', true);" | sudo tee -a $final_path/config/connect.php - # else - # sudo sed -i "s@//define('FORCE_SSL_ADMIN@define('FORCE_SSL_ADMIN@g" $final_path/config/connect.php - # fi else sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf fi