1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00

Investiguating restore failed

This commit is contained in:
ewilly 2022-01-05 22:33:12 +01:00
parent b276883c92
commit cfb2d2bae0
2 changed files with 18 additions and 10 deletions

View file

@ -7,14 +7,14 @@
setup_sub_dir=0
setup_root=1
setup_nourl=0
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=4eaade48e9bdccf56a53f09a269b2e5ba7621296
setup_private=0
setup_public=0
upgrade=0
upgrade=0 from_commit=4eaade48e9bdccf56a53f09a269b2e5ba7621296
backup_restore=1
multi_instance=0
port_already_use=1
change_url=1
port_already_use=0
change_url=0
;;; Options
Notification=all
;;; Upgrade options

View file

@ -81,10 +81,10 @@ 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..."
@ -95,3 +95,11 @@ ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload
ynh_script_progression --message="Restoration completed for $app" --last
#for debug purpose
for ((i = 1 ; i <= 30 ; i++)); do
ynh_print_warn --message= "\r$i) $(date)"
curl --silent --show-error --insecure --location --header "Host: $domain" --resolve "$domain":443:127.0.0.1 "https://localhost/"
echo -e -n "\r"
sleep 10
done