mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Remove unecessary ynh_replace_string
This commit is contained in:
parent
810d5bd4ab
commit
3cb3ea13b0
4 changed files with 7 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
homeassistant:
|
homeassistant:
|
||||||
auth_providers:
|
auth_providers:
|
||||||
- type: command_line
|
- type: command_line
|
||||||
command: __DATAPATH__/.__APP__/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 __DATAPATH__/.__APP__/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
|
||||||
|
|
|
@ -5,9 +5,9 @@ After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
WorkingDirectory=__DATAPATH__/.__APP__
|
WorkingDirectory=__DATA_PATH__/.__APP__
|
||||||
ExecStart=__FINALPATH__/bin/hass --config "__DATAPATH__/.__APP__" --log-file "__LOGFILE__" --verbose
|
ExecStart=__FINALPATH__/bin/hass --config "__DATA_PATH__/.__APP__" --log-file "__LOG_FILE__" --verbose
|
||||||
StandardOutput=append:__LOGFILE__
|
StandardOutput=append:__LOG_FILE__
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
|
|
||||||
# Sandboxing options to harden security
|
# Sandboxing options to harden security
|
||||||
|
@ -24,7 +24,7 @@ DevicePolicy=closed
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
ProtectControlGroups=yes
|
ProtectControlGroups=yes
|
||||||
ProtectKernelModules=yes
|
ProtectKernelModules=yes
|
||||||
ProtectKernelTunables=yes
|
# ProtectKernelTunables=yes
|
||||||
LockPersonality=yes
|
LockPersonality=yes
|
||||||
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
|
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
|
||||||
|
|
||||||
|
|
|
@ -67,10 +67,8 @@ 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="__APP__" --replace_string="$app" --target_file="../conf/homeassistant_conf_files/configuration.yaml"
|
|
||||||
ynh_replace_string --match_string="__DATAPATH__" --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/"
|
||||||
|
ynh_add_config --template="../conf/homeassistant_conf_files/configuration.yaml" --destination="$data_path/.$app/configuration.yaml"
|
||||||
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/"
|
||||||
|
|
||||||
|
@ -81,8 +79,6 @@ chown -R root: "/etc/sudoers.d/$app"
|
||||||
|
|
||||||
# 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="__DATAPATH__" --replace_string="$data_path" --target_file="../conf/systemd.service"
|
|
||||||
ynh_replace_string --match_string="__LOGFILE__" --replace_string="$log_file" --target_file="../conf/systemd.service"
|
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
## add service in admin panel
|
## add service in admin panel
|
||||||
|
|
|
@ -84,8 +84,6 @@ 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="__DATAPATH__" --replace_string="$data_path" --target_file="../conf/systemd.service"
|
|
||||||
ynh_replace_string --match_string="__LOGFILE__" --replace_string="$log_file" --target_file="../conf/systemd.service"
|
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
# grant sudo permissions to the user to manage his own systemd service
|
# grant sudo permissions to the user to manage his own systemd service
|
||||||
|
|
Loading…
Reference in a new issue