diff options
| author | Jeff Carr <[email protected]> | 2024-11-16 13:51:25 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-16 13:51:25 -0600 |
| commit | 3f10b49f048b773cd3c43b7ea035623979166e5c (patch) | |
| tree | ae4ddc71599ba93105defe1a8bf3e45f2570cddf | |
| parent | 68933a8ec78d6b3476a9fe275b15cf45aedd4c0d (diff) | |
misc
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | send.go | 2 | ||||
| -rw-r--r-- | structs.go | 12 | ||||
| -rw-r--r-- | zood.service | 2 |
4 files changed, 12 insertions, 12 deletions
@@ -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 @@ -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) } @@ -10,11 +10,11 @@ var me *stuff // this app's variables type stuff struct { - hostname string // my hostname to send to zookeeper - zookeeper string // the dns name for the zookeeper - pollDelay time.Duration // how often to report our status - dog *time.Ticker // the watchdog timer - distro string // debian,redhat,gentoo,macos,wincrap - machine *zoopb.Machine // my protobuf + hostname string // my hostname to send to zookeeper + zookeeper string // the dns name for the zookeeper + pollDelay time.Duration // how often to report our status + dog *time.Ticker // the watchdog timer + distro string // debian,redhat,gentoo,macos,wincrap + machine *zoopb.Machine // my protobuf // packages *zoopb.Packages // installed packages and versions } diff --git a/zood.service b/zood.service index e328c92..ee7d48f 100644 --- a/zood.service +++ b/zood.service @@ -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 |
