misc
This commit is contained in:
parent
68933a8ec7
commit
3f10b49f04
8
Makefile
8
Makefile
|
@ -19,14 +19,12 @@ install:
|
||||||
GO111MODULE=off go install \
|
GO111MODULE=off go install \
|
||||||
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
|
|
||||||
# this is for release builds using the go.mod files
|
sudo: build
|
||||||
release-build:
|
sudo ./zood
|
||||||
@echo ${REDOMOD}
|
|
||||||
go build -v -ldflags "-X main.VERSION=${VERSION} -X gui.GUIVERSION=${VERSION}"
|
|
||||||
|
|
||||||
# makes a .deb package
|
# makes a .deb package
|
||||||
debian:
|
debian:
|
||||||
go-deb --no-gui --repo go.wit.com/lib/daemons/zood
|
go-deb --auto --repo go.wit.com/lib/daemons/zood
|
||||||
|
|
||||||
goimports:
|
goimports:
|
||||||
goimports -w *.go
|
goimports -w *.go
|
||||||
|
|
2
send.go
2
send.go
|
@ -5,6 +5,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"go.wit.com/lib/gui/shell"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ func sendMachine() error {
|
||||||
switch line {
|
switch line {
|
||||||
case "upgrade":
|
case "upgrade":
|
||||||
log.Info("machine upgrade now")
|
log.Info("machine upgrade now")
|
||||||
|
shell.Run([]string{"apt", "update"})
|
||||||
default:
|
default:
|
||||||
log.Info("GOT:", line)
|
log.Info("GOT:", line)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ Description=zood
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/zood
|
ExecStart=/usr/bin/zood --daemon
|
||||||
ExecStop=killall zood
|
ExecStop=killall zood
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
Loading…
Reference in New Issue