mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Debug restore
This commit is contained in:
parent
3f1bc519bd
commit
cf2d515740
2 changed files with 7 additions and 5 deletions
|
@ -1,12 +1,14 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Home Assistant
|
Description=Home Assistant
|
||||||
After=network-online.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
WorkingDirectory=__PATH__
|
WorkingDirectory=__PATH__
|
||||||
ExecStart=/opt/yunohost/__APP__/bin/hass --config "__PATH__" --verbose
|
ExecStart=/opt/yunohost/__APP__/bin/hass --config "__PATH__" --verbose
|
||||||
|
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||||
|
StandardError=inherit
|
||||||
|
|
||||||
# Sandboxing options to harden security
|
# Sandboxing options to harden security
|
||||||
# Depending on specificities of your service/app, you may need to tweak these
|
# Depending on specificities of your service/app, you may need to tweak these
|
||||||
|
|
|
@ -66,10 +66,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="systemd" --timeout=900
|
ynh_systemd_action --service_name="$app" --action=start --line_match="Home Assistant initialized" --log_path="systemd" --timeout=900
|
||||||
|
|
||||||
# remove --verbose from service and restart
|
# remove --verbose from service and restart
|
||||||
ynh_replace_string --match_string=" --verbose" --replace_string="" --target_file="/etc/systemd/system/$app.service"
|
#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"
|
#ynh_store_file_checksum --file="/etc/systemd/system/$app.service"
|
||||||
systemctl daemon-reload
|
#systemctl daemon-reload
|
||||||
ynh_systemd_action --service_name="$app" --action=restart
|
#ynh_systemd_action --service_name="$app" --action=restart
|
||||||
|
|
||||||
# restore logrotate
|
# restore logrotate
|
||||||
ynh_script_progression --message="Restoring logrotate..."
|
ynh_script_progression --message="Restoring logrotate..."
|
||||||
|
|
Loading…
Add table
Reference in a new issue