diff --git a/check_process b/check_process index 7e9587d..2bf53ff 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + admin="john" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 @@ -15,7 +15,6 @@ #upgrade=1 from_commit=CommitHash backup_restore=1 multi_instance=0 - port_already_use=0 change_url=1 ;;; Options Email= diff --git a/scripts/install b/scripts/install index 39c746e..8c86736 100644 --- a/scripts/install +++ b/scripts/install @@ -119,8 +119,6 @@ ynh_app_setting_set --app=$app --key=data_path --value=$data_path # Create datadir folder mkdir -p $data_path -# Create config folder -mkdir -p $final_path/config # Give permission to the datadir chmod 750 "$data_path" @@ -132,7 +130,7 @@ chown -R $app:www-data "$data_path" #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" ynh_add_systemd_config @@ -141,7 +139,11 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Modifying a config file..." --weight=1 +# Create config folder +mkdir -p $final_path/config + ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config/config.json" + chmod 600 "$final_path/config/config.json" chown $app:$app "$final_path/config/config.json" diff --git a/scripts/remove b/scripts/remove index a307093..7856701 100644 --- a/scripts/remove +++ b/scripts/remove @@ -64,7 +64,7 @@ ynh_secure_remove --file="$final_path" if [ "${YNH_APP_PURGE:-0}" -eq 1 ] then ynh_script_progression --message="Removing app data directory..." --weight=1 - ynh_secure_remove --file="$datadir" + ynh_secure_remove --file="$data_path" fi #================================================= # REMOVE NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 4e1f5b0..54ddca5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -127,6 +127,7 @@ fi ynh_script_progression --message="Modifying a config file..." --weight=2 ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config/config.json" + chmod 600 "$final_path/config/config.json" chown $app:$app "$final_path/config/config.json" @@ -135,7 +136,7 @@ chown $app:$app "$final_path/config/config.json" #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=2 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" # Create a dedicated systemd config ynh_add_systemd_config