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
4bfc67ea44
commit
c2152d0c97
4 changed files with 7 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
homeassistant:
|
homeassistant:
|
||||||
auth_providers:
|
auth_providers:
|
||||||
- type: command_line
|
- type: command_line
|
||||||
command: __PATH__/bin/ynh_ldap-auth.sh
|
command: __DATA_PATH__/.__APP__/bin/ynh_ldap-auth.sh
|
||||||
meta: true
|
meta: true
|
||||||
|
|
||||||
http:
|
http:
|
||||||
|
@ -19,5 +19,5 @@ switch:
|
||||||
- platform: command_line
|
- platform: command_line
|
||||||
switches:
|
switches:
|
||||||
upgrade_homeassistant:
|
upgrade_homeassistant:
|
||||||
command_on: "nohup bash -c __PATH__/bin/upgrade_homeassistant.sh $1 > /dev/null 2>&1 &"
|
command_on: "nohup bash -c __DATA_PATH__/.__APP__/bin/upgrade_homeassistant.sh $1 > /dev/null 2>&1 &"
|
||||||
friendly_name: Upgrade Home Assistant
|
friendly_name: Upgrade Home Assistant
|
||||||
|
|
|
@ -6,7 +6,7 @@ After=network.target
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
WorkingDirectory=__PATH__
|
WorkingDirectory=__PATH__
|
||||||
ExecStart=/opt/yunohost/__APP__/bin/hass --config "__PATH__" --log-file "/var/log/__APP__/__APP__.log" --verbose
|
ExecStart=/opt/yunohost/__APP__/bin/hass --config "__DATA_PATH__/.__APP__" --log-file "/var/log/__APP__/__APP__.log" --verbose
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -68,13 +68,15 @@ ynh_exec_fully_quiet myynh_install_homeassistant --path="$data_path"
|
||||||
# set default configuration files and move all homeassistant_conf_files
|
# set default configuration files and move all homeassistant_conf_files
|
||||||
ynh_script_progression --message="Configuring the installation..."
|
ynh_script_progression --message="Configuring the installation..."
|
||||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/homeassistant_conf_files/configuration.yaml"
|
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/homeassistant_conf_files/configuration.yaml"
|
||||||
ynh_replace_string --match_string="__PATH__" --replace_string="$data_path/.$app" --target_file="../conf/homeassistant_conf_files/configuration.yaml"
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/homeassistant_conf_files/configuration.yaml"
|
||||||
|
ynh_replace_string --match_string="__DATA_PATH__" --replace_string="$data_path" --target_file="../conf/homeassistant_conf_files/configuration.yaml"
|
||||||
cp -r "../conf/homeassistant_conf_files/." "$data_path/.$app/"
|
cp -r "../conf/homeassistant_conf_files/." "$data_path/.$app/"
|
||||||
chown -R $app: "$data_path/.$app"
|
chown -R $app: "$data_path/.$app"
|
||||||
chmod -R +x "$data_path/.$app/bin/"
|
chmod -R +x "$data_path/.$app/bin/"
|
||||||
|
|
||||||
# setup up systemd service
|
# setup up systemd service
|
||||||
ynh_script_progression --message="Adding the dedicated service..."
|
ynh_script_progression --message="Adding the dedicated service..."
|
||||||
|
ynh_replace_string --match_string="__DATA_PATH__" --replace_string="$data_path" --target_file="../conf/systemd.service"
|
||||||
ynh_add_systemd_config --service="$app"
|
ynh_add_systemd_config --service="$app"
|
||||||
|
|
||||||
## add service in admin panel
|
## add service in admin panel
|
||||||
|
|
|
@ -76,6 +76,7 @@ chmod -R +x "$data_path/.$app/bin/"
|
||||||
|
|
||||||
# setup up systemd service
|
# setup up systemd service
|
||||||
ynh_script_progression --message="Adding the dedicated service..."
|
ynh_script_progression --message="Adding the dedicated service..."
|
||||||
|
ynh_replace_string --match_string="__DATA_PATH__" --replace_string="$data_path" --target_file="../conf/systemd.service"
|
||||||
ynh_add_systemd_config --service="$app"
|
ynh_add_systemd_config --service="$app"
|
||||||
|
|
||||||
# add service in admin panel
|
# add service in admin panel
|
||||||
|
|
Loading…
Reference in a new issue