diff --git a/scripts/upgrade b/scripts/upgrade index da34cbe..84be02f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,6 +41,12 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="config.local.php data/plugins" fi +if [ ! -f "$data_dir/data/config.local.user.php" ]; then + ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" + chmod 650 "$data_dir/data/config.local.user.php" + chown $app:$app "$data_dir/data/config.local.user.php" +fi + chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -70,12 +76,6 @@ then chown $app:$app "$install_dir/config.local.php" fi -if [ ! -f "$data_dir/data/config.local.user.php" ]; then - ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 - ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" - chmod 650 "$data_dir/data/config.local.user.php" - chown $app:$app "$data_dir/config.local.user.php" -fi #================================================= # END OF SCRIPT