From de51dfb9c2ef6701c682006167a70e6527520959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 20 Jun 2024 13:13:03 +0200 Subject: [PATCH] quoting --- scripts/install | 13 ++++--------- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 49e9db8..0f11817 100644 --- a/scripts/install +++ b/scripts/install @@ -15,6 +15,9 @@ timezone=$(cat /etc/timezone) encrypt_key=$(ynh_string_random 24) password_hash=$(echo -n admin:BaikalDAV:$password | sha256sum | cut -d ' ' -f 1) +ynh_app_setting_set --app="$app" --key="encrypt_key" --value="$encrypt_key" +ynh_app_setting_set --app="$app" --key="password_hash" --value="$password_hash" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -26,14 +29,6 @@ then ynh_die --message="Another app already uses the domain $domain to serve a calDAV/cardDAV feature. Please use another domain." fi -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=2 - -ynh_app_setting_set --app=$app --key=encrypt_key --value="$encrypt_key" -ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -42,7 +37,7 @@ ynh_script_progression --message="Setting up source files..." --weight=8 ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # SYSTEM CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 78c0f66..47121dd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -58,7 +58,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 25e2943..c443ba4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=3 ynh_setup_source --dest_dir="$install_dir" --keep="config/baikal.yaml" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS