diff --git a/labelapi.service b/labelapi.service new file mode 100644 index 0000000..c54156a --- /dev/null +++ b/labelapi.service @@ -0,0 +1,17 @@ +[Unit] +Description=Label Maker API +ConditionPathExists=/home/mattronix/escpos-go-labels +After=network.target +[Service] +Type=simple +User=mattronix +Group=mattronix +WorkingDirectory=/home/mattronix/escpos-go-labels +ExecStart=/usr/bin/go run main.go +Restart=on-failure +RestartSec=10 +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=labelapi +[Install] +WantedBy=multi-user.target \ No newline at end of file