diff --git a/homeassistant/core.py b/homeassistant/core.py index fc1ff2e8cbe..d7ec3abe458 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -84,7 +84,7 @@ class HomeAssistant(object): if os.name != "nt": try: - signal.signal(signal.SIGQUIT, stop_homeassistant) + signal.signal(signal.SIGTERM, stop_homeassistant) except ValueError: _LOGGER.warning( 'Could not bind to SIGQUIT. Are you running in a thread?') diff --git a/script/hass-daemon b/script/hass-daemon index bb14ce7f0a6..0501ba885a2 100755 --- a/script/hass-daemon +++ b/script/hass-daemon @@ -53,7 +53,7 @@ stop() { return 1 fi 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; echo 'Service stopped' >&2 } diff --git a/script/home-assistant@.service b/script/home-assistant@.service index 983844a95a3..1fffbc3c344 100644 --- a/script/home-assistant@.service +++ b/script/home-assistant@.service @@ -9,6 +9,7 @@ Type=simple User=%i WorkingDirectory=%h ExecStart=/usr/bin/hass --config %h/.homeassistant/ +SendSIGKILL=no [Install] WantedBy=multi-user.target