1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bonfire_ynh.git synced 2024-09-03 18:16:01 +02:00

restore systemd

This commit is contained in:
lapineige 2024-01-21 16:29:47 +01:00 committed by GitHub
parent d296bbcf41
commit 24e499e357
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,12 +29,28 @@ ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./d
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
mkdir -p "/var/log/$app"
chown -R $app:$app "/var/log/$app"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# GENERIC FINALIZATION
#=================================================