1
0
mirror of https://git.sdf.org/rudi/headless9.git synced 2026-03-22 05:17:27 +00:00
This commit is contained in:
2022-07-31 11:19:24 -04:00
parent 5f41341e1a
commit 1598980f0e
2 changed files with 18 additions and 21 deletions

View File

@ -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() {
log.Printf(DAEMON_PROCESSING_CTL, cmd)
}
}
}
}
func execCommand(cmd string, arg ...string) {
defer PanicSafe()
if len(cmd) < 2 {

View File

@ -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."
)