mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Fix
This commit is contained in:
parent
c2152d0c97
commit
8fb2561dd4
3 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,8 @@ domain=$(ynh_app_setting_get --app="$app" --key=domain)
|
|||
# definie useful vars
|
||||
final_path="/opt/yunohost/$app"
|
||||
data_path="/home/yunohost.app/$app"
|
||||
log_file="/var/log/$app/$app.log"
|
||||
path_url="/"
|
||||
|
||||
# backup source & conf files
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
@ -24,5 +26,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_backup --src_path="/etc/sudoers.d/$app"
|
||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||
ynh_backup --src_path="$(dirname "$log_file")"
|
||||
|
||||
ynh_print_info --message="Backup of $app completed"
|
||||
|
|
|
@ -14,6 +14,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
|
|||
final_path="/opt/yunohost/$app"
|
||||
data_path="/home/yunohost.app/$app"
|
||||
log_file="/var/log/$app/$app.log"
|
||||
path_url="/"
|
||||
|
||||
# Remove a service from the admin panel, added by `yunohost service add`
|
||||
if ynh_exec_warn_less yunohost service status "$app" >/dev/null ; then
|
||||
|
|
|
@ -50,6 +50,11 @@ ynh_restore_file --origin_path="$data_path"
|
|||
chown -R $app: "$data_path"
|
||||
chmod -R +x "$data_path/.$app/bin"
|
||||
|
||||
# restore log
|
||||
ynh_script_progression --message="Restoring the app..."
|
||||
ynh_restore_file --origin_path="$(dirname "$log_file")"
|
||||
chown -R $app: "$log_file"
|
||||
|
||||
# add required packages
|
||||
ynh_script_progression --message="Restoring the packages dependencies..."
|
||||
myynh_install_dependencies --python="$python"
|
||||
|
|
Loading…
Reference in a new issue