add label_printer.service
This commit is contained in:
parent
2418a7cff9
commit
1abdb0cbd2
1 changed files with 17 additions and 0 deletions
17
label_printer.service
Normal file
17
label_printer.service
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Label printer webservice
|
||||||
|
ConditionPathExists=/home/pi/label_printer
|
||||||
|
After=network.target
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=pi
|
||||||
|
Group=lp
|
||||||
|
WorkingDirectory=/home/pi/label_printer
|
||||||
|
ExecStart=sh -c "/bin/python3 app.py 2>&1 | tee /home/pi/log/labelprinter.log"
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
SyslogIdentifier=labelapi
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue