Browse Source

go fmt

master
Gregory Rudolph 2 years ago
parent
commit
1598980f0e
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 9
      main.go
  2. 22
      strings.go

9
main.go

@ -12,12 +12,12 @@ import ( @@ -12,12 +12,12 @@ import (
)
var (
startup []string
daemon = false
startup []string
daemon = false
serviceFile = "/adm/services"
services = make(map[string]string)
controlSocket = "/adm/headless9/ctl/headless9.ctl"
logPath = "/adm/headless9/log/"
logPath = "/adm/headless9/log/"
)
func main() {
@ -119,12 +119,9 @@ func headlessControls() { @@ -119,12 +119,9 @@ func headlessControls() {
log.Printf(DAEMON_PROCESSING_CTL, cmd)
}
}
}
}
func execCommand(cmd string, arg ...string) {
defer PanicSafe()
if len(cmd) < 2 {

22
strings.go

@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
package main
var (
DAEMON_START = "Starting headless9"
CMD_SYNTAX = "Command structure: \"headless9 $verb $service\""
CTL_UNABLE_WRITE = "Unable to write to Control Socket. Please check the file %+v and that it's permissions are 700"
CTL_NOT_OPEN = "Unable to open Control Socket. Please check the file %+v and that it's permissions are 700"
CTL_NOT_CLEAR = "Unable to clear Control Socket. Please check the file %+v and that it's permissions are 700"
CTL_NOT_REWOUND = "Unable to rewind Control Socket. Please check the file %+v and that it's permissions are 700"
DAEMON_FILE_REFRESH = "Refreshing controlFile %+v"
DAEMON_SVC_EXISTS = "%+v exists as PID %+v"
DAEMON_SVC_MISSING = "Svc not detected, starting: %+v"
DAEMON_START = "Starting headless9"
CMD_SYNTAX = "Command structure: \"headless9 $verb $service\""
CTL_UNABLE_WRITE = "Unable to write to Control Socket. Please check the file %+v and that it's permissions are 700"
CTL_NOT_OPEN = "Unable to open Control Socket. Please check the file %+v and that it's permissions are 700"
CTL_NOT_CLEAR = "Unable to clear Control Socket. Please check the file %+v and that it's permissions are 700"
CTL_NOT_REWOUND = "Unable to rewind Control Socket. Please check the file %+v and that it's permissions are 700"
DAEMON_FILE_REFRESH = "Refreshing controlFile %+v"
DAEMON_SVC_EXISTS = "%+v exists as PID %+v"
DAEMON_SVC_MISSING = "Svc not detected, starting: %+v"
DAEMON_PROCESSING_CTL = "Processing command: %+v"
DAEMON_CMD_INVALID = "Invalid command `%v`, skipping. Args: { %+v }"
DAEMON_SVC_FAIL = "Error starting service %+v, see log for more info."
DAEMON_CMD_INVALID = "Invalid command `%v`, skipping. Args: { %+v }"
DAEMON_SVC_FAIL = "Error starting service %+v, see log for more info."
)
Loading…
Cancel
Save