mirror of
https://github.com/YunoHost-Apps/ntfy_ynh.git
synced 2024-09-03 19:46:27 +02:00
1fa0147e21
(cherry picked from commit 1a7fde7c120fea7872ec909141a7e7824dbff376) Signed-off-by: Alexander Wühr <awuehr@pnyhf.eu>
25 lines
No EOL
950 B
Bash
Executable file
25 lines
No EOL
950 B
Bash
Executable file
#!/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"
|
|
|
|
ynh_script_progression --message="Restoring the web server configuration..." --weight=1
|
|
ynh_restore_file -o "/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
|
|
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
|
|
|
|
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
|
yunohost service add $app
|
|
|
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
|
ynh_systemd_action --action=start
|
|
|
|
ynh_script_progression --message="Reloading the web server..." --weight=1
|
|
ynh_systemd_action --service_name=nginx --action=reload
|
|
|
|
ynh_script_progression --message="Restoration completed" --last |