mirror of
https://github.com/Evidlo/remarkable_printer.git
synced 2024-10-20 03:27:37 -04:00
restart remux, tarnish, draft
This commit is contained in:
parent
37c00b6a5c
commit
6df7276abf
15
main.go
15
main.go
|
@ -83,12 +83,15 @@ func main() {
|
||||||
|
|
||||||
// Restart xochitl
|
// Restart xochitl
|
||||||
if *restart {
|
if *restart {
|
||||||
_, exitcode := exec.Command("systemctl", "is-active", "xochitl").CombinedOutput()
|
services := []string{"xochitl", "remux", "tarnish", "draft"}
|
||||||
if exitcode == nil {
|
for _, service := range services {
|
||||||
debug("Restarting xochitl")
|
_, exitcode := exec.Command("systemctl", "is-active", service).CombinedOutput()
|
||||||
stdout, err := exec.Command("systemctl", "restart", "xochitl").CombinedOutput()
|
if exitcode == nil {
|
||||||
if err != nil {
|
debug("Restarting " + service)
|
||||||
fmt.Println("xochitl restart failed with message:", string(stdout))
|
stdout, err := exec.Command("systemctl", "restart", service).CombinedOutput()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(service + " restart failed with message:", string(stdout))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue