This commit is contained in:
Jeff Carr 2024-11-16 13:51:25 -06:00
parent 68933a8ec7
commit 3f10b49f04
4 changed files with 12 additions and 12 deletions

View File

@ -19,14 +19,12 @@ install:
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
# this is for release builds using the go.mod files
release-build:
@echo ${REDOMOD}
go build -v -ldflags "-X main.VERSION=${VERSION} -X gui.GUIVERSION=${VERSION}"
sudo: build
sudo ./zood
# makes a .deb package
debian:
go-deb --no-gui --repo go.wit.com/lib/daemons/zood
go-deb --auto --repo go.wit.com/lib/daemons/zood
goimports:
goimports -w *.go

View File

@ -5,6 +5,7 @@ package main
import (
"strings"
"go.wit.com/lib/gui/shell"
"go.wit.com/log"
)
@ -62,6 +63,7 @@ func sendMachine() error {
switch line {
case "upgrade":
log.Info("machine upgrade now")
shell.Run([]string{"apt", "update"})
default:
log.Info("GOT:", line)
}

View File

@ -4,7 +4,7 @@ Description=zood
[Service]
User=root
Type=simple
ExecStart=/usr/bin/zood
ExecStart=/usr/bin/zood --daemon
ExecStop=killall zood
Restart=on-failure
RestartSec=5