1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ntfy_ynh.git synced 2024-09-03 19:46:27 +02:00
ntfy_ynh/scripts/restore

25 lines
950 B
Text
Raw Normal View History

2022-11-02 10:16:52 +01:00
#!/bin/bash
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
ynh_script_progression --message="Restoring the main directory..." --weight=1
ynh_restore_file -o "$install_dir"
2022-11-02 10:16:52 +01:00
ynh_script_progression --message="Restoring the web server configuration..." --weight=1
ynh_restore_file -o "/etc/nginx/conf.d/$domain.d/$app.conf"
2022-11-02 10:16:52 +01:00
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
ynh_systemd_action --action=enable
2022-11-02 10:16:52 +01:00
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
2022-11-18 09:48:08 +01:00
yunohost service add $app
2022-11-02 10:16:52 +01:00
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --action=start
2022-11-02 10:16:52 +01:00
ynh_script_progression --message="Reloading the web server..." --weight=1
2022-11-02 10:16:52 +01:00
ynh_systemd_action --service_name=nginx --action=reload
ynh_script_progression --message="Restoration completed" --last