From d61f80bbf69372e96788ac688d35dde55a275210 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 10 Jun 2021 17:07:33 +0200 Subject: [PATCH] Remove other_var --- scripts/install | 9 +++++---- scripts/upgrade | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index c236d77..94018b1 100644 --- a/scripts/install +++ b/scripts/install @@ -203,16 +203,17 @@ fi ynh_store_file_checksum --file="$final_path/settings.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" +# Restrict access to credentials.json +chmod 600 $final_path/credentials.json #================================================= # SECURING FILES AND DIRECTORIES #================================================= # Set files ownership to etherpad -chown -R $app:$app $final_path +chmod 750 "$final_path" chmod o-rwx $final_path -# Restrict access to credentials.json -chmod 600 $final_path/credentials.json +chown -R $app: $final_path #================================================= # SETUP SYSTEMD @@ -220,7 +221,7 @@ chmod 600 $final_path/credentials.json ynh_script_progression --message="Configuring a systemd service..." --weight=4 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="ynh_node_load_PATH" +ynh_add_systemd_config #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/upgrade b/scripts/upgrade index 318f6b9..e2f0fe2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -394,8 +394,9 @@ fi #================================================= # Set files ownership to Etherpad -chown -R $app: $final_path +chmod 750 "$final_path" chmod o-rwx $final_path +chown -R $app: $final_path # Restrict access to credentials.json chmod 600 "$final_path/credentials.json" chown $app -R /var/log/$app/etherpad.log @@ -430,7 +431,7 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 # Overwrite the systemd configuration only if it's allowed if [ $overwrite_systemd -eq 1 ] then - ynh_add_systemd_config --others_var="ynh_node_load_PATH" + ynh_add_systemd_config fi #=================================================