|
|
|
@ -48,7 +48,7 @@ func main() {
@@ -48,7 +48,7 @@ func main() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func getCtl() *os.File { |
|
|
|
|
f, err := os.OpenFile(controlSocket, os.O_TRUNC, 0700) |
|
|
|
|
f, err := os.OpenFile(controlSocket, os.O_TRUNC, 0660) |
|
|
|
|
if err != nil { |
|
|
|
|
if daemon { |
|
|
|
|
log.Printf(CTL_NOT_OPEN, controlSocket) |
|
|
|
@ -134,9 +134,7 @@ func processCommand(cmd string) error {
@@ -134,9 +134,7 @@ func processCommand(cmd string) error {
|
|
|
|
|
svc := parts[1] |
|
|
|
|
start := time.Now() |
|
|
|
|
if verb == "restart" || verb == "stop" { |
|
|
|
|
for testSvc := range services { |
|
|
|
|
if svc == testSvc { |
|
|
|
|
f, err := os.OpenFile(fmt.Sprintf("/proc/%d/ctl", services[svc].ProcessHandle.Pid), os.O_WRONLY, 0600) |
|
|
|
|
f, err := os.OpenFile(fmt.Sprintf("/proc/%d/ctl", services[svc].ProcessHandle.Pid), os.O_WRONLY, 0660) |
|
|
|
|
if err != nil { |
|
|
|
|
log.Printf("") |
|
|
|
|
} |
|
|
|
|