diff --git a/conf/systemd.service b/conf/systemd.service index 63adb2c..a0ba71a 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,7 +6,7 @@ After=network.target Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/api/ +WorkingDirectory=__FINALPATH__/ Environment="PATH=__ENV_PATH__" ExecStart=__YNH_NODE__ __FINALPATH__/server.js Restart=on-failure diff --git a/scripts/install b/scripts/install index 2474de2..b28e6b5 100755 --- a/scripts/install +++ b/scripts/install @@ -132,7 +132,7 @@ chown $app:$app "$final_path/config/config.yaml" #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Configuring a systemd service..." --time --weight=1 +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" # Create a dedicated systemd config @@ -143,7 +143,7 @@ ynh_add_systemd_config #================================================= # SETUP LOGROTATE #================================================= -ynh_script_progression --message="Configuring log rotation..." --time --weight=1 +ynh_script_progression --message="Configuring log rotation..." --weight=4 # Use logrotate to manage application logfile(s) ynh_use_logrotate