2022-11-02 10:16:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source ../settings/scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2023-02-24 14:01:24 +01:00
|
|
|
ynh_script_progression --message="Restoring the main directory..." --weight=1
|
|
|
|
ynh_restore_file -o "$install_dir"
|
2022-11-02 10:16:52 +01:00
|
|
|
|
2023-02-24 14:01:24 +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"
|
2023-02-24 14:01:24 +01:00
|
|
|
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
|
2023-02-24 14:01:24 +01:00
|
|
|
ynh_systemd_action --action=start
|
2022-11-02 10:16:52 +01:00
|
|
|
|
2023-02-24 14:01:24 +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
|
|
|
|
|
2023-02-24 14:01:24 +01:00
|
|
|
ynh_script_progression --message="Restoration completed" --last
|