-
Notifications
You must be signed in to change notification settings - Fork 168
Daemonizing
Daniel Perna edited this page Mar 7, 2019
·
1 revision
Since the configurator script on its own is no service, you'll have to take some extra steps to keep it running and / or automatically starting after the system has booted. Here are 5 options (for Linux), but there are more, depending on your usecase.
- Fork into the background with the command
nohup sudo ./configurator.py &
- If your system is using systemd (that's usually what you'll find on a Raspberry PI), there's a template file you can use and then apply the same process to integrate it as mentioned in the Home Assistant documentation. If you use this method you have to set the
BASEPATH
variable according to your environment. - If you have supervisor running on your system, hass-poc-configurator.supervisor would be an example configuration you could use to control the configurator.
- A tool called tmux, which should be pre-installed with recent AIO installers.
- A tool called screen. If it's not already installed on your system, you can do
sudo apt-get install screen
to get it. When it's installed, start a screen session by executingscreen
. Then navigate to your Home Assistant directory and start the configurator like described above. Put the screen session into the background by pressingCTRL+A
and thenCTRL+D
. To resume the screen session, log in to your machine and executescreen -r
.