1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00
This commit is contained in:
OniriCorpe 2024-02-13 21:54:06 +01:00
parent 95c762902a
commit 625aa670c9
3 changed files with 8 additions and 6 deletions

View file

@ -53,7 +53,7 @@ ynh_add_systemd_config
# Create a dedicated nginx config
ynh_add_nginx_config
yunohost service add "$app" --description="Friendica daemon" --log="/var/log/$app/daemon.log"
yunohost service add "$app-daemon" --description="Friendica daemon" --log="/var/log/$app/daemon.log"
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
@ -93,7 +93,7 @@ popd
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name="$app-daemon" --action="start" --log_path="/var/log/$app/daemon.log"
#=================================================
# END OF SCRIPT

View file

@ -38,7 +38,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
yunohost service add "$app" --description="Friendica daemon" --log="/var/log/$app/daemon.log"
yunohost service add "$app-daemon" --description="Friendica daemon" --log="/var/log/$app/daemon.log"
ynh_restore_file --origin_path="/var/log/$app/daemon.log"
@ -61,6 +61,8 @@ ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
ynh_systemd_action --service_name=nginx --action=reload
ynh_systemd_action --service_name="$app-daemon" --action="start" --log_path="/var/log/$app/daemon.log"
#==============
# FINALIZATION
#==============

View file

@ -20,7 +20,7 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/daemon.log"
ynh_systemd_action --service_name="$app-daemon" --action="stop" --log_path="/var/log/$app/daemon.log"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -57,7 +57,7 @@ fi
ynh_add_systemd_config
yunohost service add "$app" --description="Friendica daemon" --log="/var/log/$app/$app.log"
yunohost service add "$app-daemon" --description="Friendica daemon" --log="/var/log/$app/daemon.log"
# Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authenticate\: failed login attempt.*\"ip\"\:\"<HOST>\".*$"
@ -87,7 +87,7 @@ popd
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name="$app-daemon" --action="start" --log_path="/var/log/$app/daemon.log"
#=================================================
# END OF SCRIPT