-
Notifications
You must be signed in to change notification settings - Fork 0
Set up as background service (daemon)
Nicolas Mehlei edited this page Sep 26, 2018
·
2 revisions
- create service file
sudo touch /etc/systemd/system/virtualdevicehost.service
- Fill file with the following content, change paths if necessary
[Unit]
Description=My service
After=network.target
[Service]
ExecStart=/home/pi/vdh-venv/bin/python3 -u /home/pi/VDHost/VDHApp.py MyFirstConfigurationStrategy -background
WorkingDirectory=/home/pi/VDHost
StandardOutput=inherit
StandardError=inherit
Restart=always
User=root
[Install]
WantedBy=multi-user.target
- reload services
sudo systemctl daemon-reload
- start service
sudo systemctl start virtualdevicehost.service