1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diacamma_ynh.git synced 2024-09-03 18:26:10 +02:00

correct systemd service

This commit is contained in:
Laurent GAY 2023-12-17 18:07:16 +01:00
parent f8574154c6
commit 1972a0cdce
2 changed files with 3 additions and 6 deletions

View file

@ -35,7 +35,7 @@ ProtectKernelModules=yes
ProtectKernelTunables=yes
LockPersonality=yes
SystemCallArchitectures=native
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation
# Denying access to capabilities that should not be relevant for webapps
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html

View file

@ -21,10 +21,9 @@ ynh_script_progression --message="Restoring system configurations related to $ap
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl daemon-reload
systemctl enable $app.service --quiet
yunohost service add ${app} --log="/var/log/${app}/${app}.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
@ -56,8 +55,6 @@ check_params
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
yunohost service add ${app} --log="/var/log/${app}/${app}.log"
# Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name=${app} --action="start" --log="/var/log/${app}/${app}.log"
@ -70,4 +67,4 @@ sleep 10 # Maybe the service needs a few seconds to actually start ...
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last
ynh_script_progression --message="Restoration completed for $app" --last