AJ ONeal
5 years ago
10 changed files with 211 additions and 74 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,11 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"fmt" |
|||
|
|||
"git.rootprojects.org/root/go-serviceman/service" |
|||
) |
|||
|
|||
func printLogMessage(conf *service.Service) { |
|||
fmt.Printf("If all went well the logs should have been created at:\n\t%s\n", conf.Logdir) |
|||
} |
@ -0,0 +1,26 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"fmt" |
|||
|
|||
"git.rootprojects.org/root/go-serviceman/manager" |
|||
"git.rootprojects.org/root/go-serviceman/service" |
|||
) |
|||
|
|||
func printLogMessage(conf *service.Service) { |
|||
sudo := "" |
|||
unit := "--unit" |
|||
if conf.System { |
|||
if !manager.IsPrivileged() { |
|||
sudo = "sudo" |
|||
} |
|||
} else { |
|||
unit = "--user-unit" |
|||
} |
|||
fmt.Println("If all went well you should be able to see some goodies in the logs:") |
|||
fmt.Printf("\t%sjournalctl -xe %s %s.service\n", sudo, unit, conf.Name) |
|||
if !conf.System { |
|||
fmt.Println("\nIf that's not the case, see https://unix.stackexchange.com/a/486566/45554.") |
|||
fmt.Println("(you may need to run `systemctl restart systemd-journald`)") |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"fmt" |
|||
|
|||
"git.rootprojects.org/root/go-serviceman/service" |
|||
) |
|||
|
|||
func printLogMessage(conf *service.Service) { |
|||
fmt.Printf("If all went well the logs should have been created at:\n\t%s\n", conf.Logdir) |
|||
} |
Loading…
Reference in new issue