diff --git a/scripts/change_url b/scripts/change_url index 27f0a57..300afc7 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -23,7 +23,7 @@ ynh_change_url_nginx_config #================================================= # UPDATE OPENSONDAGE CONFIGURATION #================================================= -ynh_script_progression --message="Reconfiguring OpenSondage..." +ynh_script_progression --message="Reconfiguring $app..." ynh_replace_string --match_string="const APP_URL = '$old_domain';" --replace_string="const APP_URL = '$new_domain';" --target_file="$install_dir/app/inc/config.php" diff --git a/scripts/install b/scripts/install index d4888bc..eceb81c 100644 --- a/scripts/install +++ b/scripts/install @@ -16,12 +16,6 @@ source /usr/share/yunohost/helpers email=$(ynh_user_get_info --username=$admin --key=mail) timezone="$(cat /etc/timezone)" -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=2 - - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -39,7 +33,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -51,7 +45,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=2 -ynh_add_config --template="../conf/config.php" --destination="$install_dir/app/inc/config.php" +ynh_add_config --template="config.php" --destination="$install_dir/app/inc/config.php" chmod 400 "$install_dir/app/inc/config.php" chown $app:$app "$install_dir/app/inc/config.php" diff --git a/scripts/restore b/scripts/restore index 32d0b28..2eb52d3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers timezone="$(cat /etc/timezone)" email=$(ynh_user_get_info --username=$admin --key=mail) + #================================================= # RESTORE THE APP MAIN DIR #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 67ad2cc..3f49373 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= + email=$(ynh_user_get_info --username=$admin --key=mail) timezone="$(cat /etc/timezone)" @@ -42,7 +43,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -57,7 +58,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Updating a configuration file..." --weight=2 - ynh_add_config --template="../conf/config.php" --destination="$install_dir/app/inc/config.php" + ynh_add_config --template="config.php" --destination="$install_dir/app/inc/config.php" chmod 400 "$install_dir/app/inc/config.php" chown $app:$app "$install_dir/app/inc/config.php" fi