diff --git a/conf/systemd.service b/conf/systemd.service index bd1b6ca0..cc0fc188 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ ExecStart=php__PHPVERSION__ __FINALPATH__/artisan horizon Restart=on-failure -#stdout_logfile=/var/log/__APP__/__APP__-horizon.log +#stdout_logfile=/var/log/__APP__/__APP__.log [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/install b/scripts/install index 3594980d..d39bcaf7 100644 --- a/scripts/install +++ b/scripts/install @@ -138,7 +138,7 @@ ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$f ynh_script_progression --message="Creating log file..." mkdir -p "/var/log/$app/" -touch "/var/log/$app/${app}-horizon.log" +touch "/var/log/$app/$app.log" chown -R $app: "/var/log/$app/" #================================================= @@ -197,14 +197,14 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" ynh_script_progression --message="Configuring log rotation..." # Use logrotate to manage application logfile(s) -ynh_use_logrotate --logfile="/var/log/$app/${app}-horizon.log" +ynh_use_logrotate --logfile="/var/log/$app/$app.log" #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="Ethical photo sharing platform" --log="/var/log/$app/${app}-horizon.log" +yunohost service add $app --description="Ethical photo sharing platform" --log="/var/log/$app/$app.log" #================================================= # START SUPERVISOR SERVICE @@ -212,7 +212,7 @@ yunohost service add $app --description="Ethical photo sharing platform" --log=" ynh_script_progression --message="Starting a supervisor service..." # Start a supervisor service -ynh_supervisor_action --service_name="$app" --action="reload" --log_path="systemd" #--line_match="success: ${app}-horizon" +ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" #--line_match="success: ${app}-horizon" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index b4c31085..e0b2da2a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -132,14 +132,14 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add "supervisor" --description="Supervisor daemon for $app" --log="/var/log/$app/${app}-horizon.log" +yunohost service add $app --description="Supervisor daemon for $app" --log="/var/log/$app/$app.log" #================================================= # START SUPERVISOR SERVICE #================================================= ynh_script_progression --message="Starting a supervisor service..." -ynh_supervisor_action --service_name="${app}-horizon" --action="reload" --log_path="systemd" --line_match="success: ${app}-horizon" +ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" #--line_match="success: ${app}-horizon" #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index d431c42d..0f68c21e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -238,7 +238,7 @@ popd ynh_script_progression --message="Creating log file..." mkdir -p "/var/log/$app/" -touch "/var/log/$app/${app}-horizon.log" +touch "/var/log/$app/$app.log" chown -R $app: "/var/log/$app/" #================================================= @@ -271,7 +271,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add "supervisor" --description="Supervisor daemon for $app" --log="/var/log/$app/${app}-horizon.log" +yunohost service add $app --description="Supervisor daemon for $app" --log="/var/log/$app/$app.log" #================================================= # START SUPERVISOR SERVICE