mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 02:07:54 +00:00
remove output in terminal after service is started
This commit is contained in:
parent
b33714bca3
commit
9d7aef94e0
@ -34,6 +34,7 @@ RUN_AS="USER"
|
||||
PID_FILE="/var/run/hass.pid"
|
||||
CONFIG_DIR="/var/opt/homeassistant"
|
||||
FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --daemon"
|
||||
REDIRECT="> $CONFIG_DIR/home-assistant.log 2>&1"
|
||||
|
||||
start() {
|
||||
if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE); then
|
||||
@ -41,7 +42,7 @@ start() {
|
||||
return 1
|
||||
fi
|
||||
echo 'Starting service…' >&2
|
||||
local CMD="$PRE_EXEC hass $FLAGS;"
|
||||
local CMD="$PRE_EXEC hass $FLAGS $REDIRECT;"
|
||||
su -c "$CMD" $RUN_AS
|
||||
echo 'Service started' >&2
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user