Merge pull request #263 from Schrolli91/flothi-p-service

Create a new service
This commit is contained in:
Florian 2017-04-19 23:23:47 +02:00 committed by GitHub
commit 0694154d04
2 changed files with 28 additions and 0 deletions

View file

@ -1,3 +1,20 @@
### Use BOSWatch as service ###
Old description below
We assume that BOSWatch is installed to /opt/boswatch! Otherwise you need to adapt all the pathes in this description and in the service-file itself.
#### Adapt the script
Enter the frequency and the decoder(s) you want to use in line 7; you can add more specific switches if you need to
### Install the service
1. Copy the file to /lib/systemd/system: sudo cp /opt/boswatch/service/boswatch.service /lib/systemd/system/
2. Change the rights: sudo chmod 644 /lib/systemd/system/boswatch.service
3. Enable the service: sudo systemcl enable boswatch.service
4. Start the service: sudo systemcl start boswatch.service
---
### Start BOSWatch as a daemon
##### Changing the init script

11
service/boswatch.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=BOSWatch
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python /opt/boswatch/boswatch.py -f 123.45M -a POC512
Restart=on-abort
[Install]
WantedBy=multi-user.target