Skip to content

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.

  1. Fork into the background with the command nohup sudo ./configurator.py &
  2. 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.
  3. If you have supervisor running on your system, hass-poc-configurator.supervisor would be an example configuration you could use to control the configurator.
  4. A tool called tmux, which should be pre-installed with recent AIO installers.
  5. 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 executing screen. Then navigate to your Home Assistant directory and start the configurator like described above. Put the screen session into the background by pressing CTRL+A and then CTRL+D. To resume the screen session, log in to your machine and execute screen -r.
Clone this wiki locally