We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cb5dd0d + cd68c68 commit d70de55Copy full SHA for d70de55
2 files changed
main.go
@@ -6,7 +6,6 @@ import (
6
"image"
7
"image/color"
8
"image/png"
9
- "log"
10
"os"
11
"strings"
12
@@ -19,10 +18,7 @@ import (
19
18
20
func main() {
21
22
- err := godotenv.Load(".env")
23
- if err != nil {
24
- log.Fatal("Error loading .env file")
25
- }
+ _ = godotenv.Overload(".env")
26
27
// printer setup
28
printerPath, found := os.LookupEnv("PRINTER_PATH")
sample.service
@@ -0,0 +1,14 @@
1
+[Unit]
2
+Description=Thermal Printer Server
3
+After=network.target
4
+StartLimitIntervalSec=0
5
+[Service]
+Type=simple
+Restart=always
+RestartSec=1
+User=coda
+ExecStart=/home/coda/simpleprint/simpleprint
+EnvironmentFile=/home/coda/simpleprint/.env
+
13
+[Install]
14
+WantedBy=multi-user.target
0 commit comments