mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Merge pull request #628 from rmkraus/dev
Small tweaks to daemon management.
This commit is contained in:
commit
aabda1b7b0
@ -84,7 +84,7 @@ class HomeAssistant(object):
|
|||||||
|
|
||||||
if os.name != "nt":
|
if os.name != "nt":
|
||||||
try:
|
try:
|
||||||
signal.signal(signal.SIGQUIT, stop_homeassistant)
|
signal.signal(signal.SIGTERM, stop_homeassistant)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
'Could not bind to SIGQUIT. Are you running in a thread?')
|
'Could not bind to SIGQUIT. Are you running in a thread?')
|
||||||
|
@ -53,7 +53,7 @@ stop() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo 'Stopping service…' >&2
|
echo 'Stopping service…' >&2
|
||||||
kill -3 $(cat "$PID_FILE")
|
kill $(cat "$PID_FILE")
|
||||||
while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
|
while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
|
||||||
echo 'Service stopped' >&2
|
echo 'Service stopped' >&2
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ Type=simple
|
|||||||
User=%i
|
User=%i
|
||||||
WorkingDirectory=%h
|
WorkingDirectory=%h
|
||||||
ExecStart=/usr/bin/hass --config %h/.homeassistant/
|
ExecStart=/usr/bin/hass --config %h/.homeassistant/
|
||||||
|
SendSIGKILL=no
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user