From 1abdb0cbd2a1f071e819b792eea6cc337053c64f Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 25 Sep 2024 22:24:25 +0200 Subject: [PATCH] add label_printer.service --- label_printer.service | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 label_printer.service diff --git a/label_printer.service b/label_printer.service new file mode 100644 index 0000000..e0174bd --- /dev/null +++ b/label_printer.service @@ -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