From 453826bda581484e961de540db1c05497e02574e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 2 May 2023 14:47:04 +0200 Subject: [PATCH] fix --- conf/{default.conf => config.json} | 0 conf/systemd.service | 2 +- scripts/install | 6 +++--- scripts/upgrade | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename conf/{default.conf => config.json} (100%) diff --git a/conf/default.conf b/conf/config.json similarity index 100% rename from conf/default.conf rename to conf/config.json diff --git a/conf/systemd.service b/conf/systemd.service index fea2bb6..d6a5e65 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,7 @@ Group=__APP__ Environment=NODE_PORT=__PORT__ WorkingDirectory=__INSTALL_DIR__/ Environment="PATH=__ENV_PATH__" -ExecStart=__YNH_NODE__ __INSTALL_DIR__/cli-boot-wrapper.js +ExecStart=__YNH_NODE__ __INSTALL_DIR__/cli-boot-wrapper.js -j __INSTALL_DIR__/config.json Restart=on-failure # Sandboxing options to harden security diff --git a/scripts/install b/scripts/install index c68755f..b71f7d4 100755 --- a/scripts/install +++ b/scripts/install @@ -46,10 +46,10 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/default.conf" --destination="$install_dir/default.json" +ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod 650 "$install_dir/default.json" -chown $app:$app "$install_dir/default.json" +chmod 650 "$install_dir/config.json" +chown $app:$app "$install_dir/config.json" #================================================= # ADD A CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 5d972c2..e4cab21 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=2 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -33,7 +33,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="save/conf/default.json" + ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi chmod -R o-rwx "$install_dir"