mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Trying to fix restore script
This commit is contained in:
parent
dfecb47b06
commit
f4dc3a18e1
1 changed files with 11 additions and 8 deletions
|
@ -39,6 +39,10 @@ ynh_script_progression --message="Restoring dedicated user and rights folders...
|
|||
ynh_system_user_create --username="$app" --groups="$USER_GROUPS"
|
||||
ynh_restore_file --origin_path="/etc/sudoers.d/$app"
|
||||
|
||||
# restore nginx
|
||||
ynh_script_progression --message="Restoring nginx web server..."
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
# restore source
|
||||
ynh_script_progression --message="Restoring the app..."
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
@ -77,18 +81,17 @@ sed --in-place "/ExecStart/s/$/ --verbose/" "/etc/systemd/system/$app.service"
|
|||
ynh_systemd_action --service_name="$app" --action=start --line_match="Home Assistant initialized" --log_path="$log_file" --timeout=900
|
||||
|
||||
# remove --verbose from service and restart
|
||||
ynh_replace_string --match_string=" --verbose" --replace_string="" --target_file="/etc/systemd/system/$app.service"
|
||||
ynh_store_file_checksum --file="/etc/systemd/system/$app.service"
|
||||
systemctl daemon-reload
|
||||
ynh_systemd_action --service_name="$app" --action=restart
|
||||
#ynh_replace_string --match_string=" --verbose" --replace_string="" --target_file="/etc/systemd/system/$app.service"
|
||||
#ynh_store_file_checksum --file="/etc/systemd/system/$app.service"
|
||||
#systemctl daemon-reload
|
||||
#ynh_systemd_action --service_name="$app" --action=restart
|
||||
|
||||
# restore logrotate
|
||||
ynh_script_progression --message="Restoring logrotate..."
|
||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||
|
||||
# restore nginx
|
||||
ynh_script_progression --message="Restoring nginx web server..."
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
# reload nginx
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
ynh_script_progression --message="Recovery of $app completed" --last
|
||||
ynh_script_progression --message="Restoration completed for $app" --last
|
||||
|
|
Loading…
Add table
Reference in a new issue