Compare commits

...

2 commits
main ... main

Author SHA1 Message Date
xbr
47b29ffe1f correct user group cwd binary for Pi system 2024-07-08 22:01:29 +02:00
x
d3489c1739 mod file stuff 2024-07-01 21:09:25 +02:00
3 changed files with 13 additions and 6 deletions

5
go.mod Normal file
View file

@ -0,0 +1,5 @@
module escpos-go-labels
go 1.22.4
require github.com/kenshaw/escpos v0.0.0-20221114190919-df06b682a8fc // indirect

2
go.sum Normal file
View file

@ -0,0 +1,2 @@
github.com/kenshaw/escpos v0.0.0-20221114190919-df06b682a8fc h1:4JwmN2Scz1vR+hfSxkdy2IE/DzxX2Cftm2lhWHyN0k0=
github.com/kenshaw/escpos v0.0.0-20221114190919-df06b682a8fc/go.mod h1:M+GIBmg2MqaSWIJrXCZS+/wRFbr9fOguRz3SHn8DRPE=

View file

@ -1,17 +1,17 @@
[Unit]
Description=Label Maker API
ConditionPathExists=/home/mattronix/escpos-go-labels
ConditionPathExists=/home/pi/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
User=pi
Group=lp
WorkingDirectory=/home/pi/escpos-go-labels
ExecStart=/usr/local/go/bin/go run main.go
Restart=on-failure
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=labelapi
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target