Issue #799 Fixed systemctl commands
This commit is contained in:
parent
fabe2ffa2f
commit
c4853f8f4f
|
@ -293,6 +293,10 @@ func installSystemd(templateArgs *ServiceTemplateArgs, log *zerolog.Logger) erro
|
||||||
log.Err(err).Msg("systemctl enable cloudflared-restart.path error")
|
log.Err(err).Msg("systemctl enable cloudflared-restart.path error")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := runCommand("systemctl", "start", "cloudflared-restart.path"); err != nil {
|
||||||
|
log.Err(err).Msg("systemctl start cloudflared-restart.path error")
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := runCommand("systemctl", "start", "cloudflared-update.timer"); err != nil {
|
if err := runCommand("systemctl", "start", "cloudflared-update.timer"); err != nil {
|
||||||
log.Err(err).Msg("systemctl start cloudflared-update.timer error")
|
log.Err(err).Msg("systemctl start cloudflared-update.timer error")
|
||||||
return err
|
return err
|
||||||
|
@ -355,6 +359,14 @@ func uninstallSystemd(log *zerolog.Logger) error {
|
||||||
log.Err(err).Msgf("systemctl stop %s error", cloudflaredService)
|
log.Err(err).Msgf("systemctl stop %s error", cloudflaredService)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := runCommand("systemctl", "disable", "cloudflared-restart.path"); err != nil {
|
||||||
|
log.Err(err).Msg("systemctl disable cloudflared-restart.path error")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := runCommand("systemctl", "stop", "cloudflared-restart.path"); err != nil {
|
||||||
|
log.Err(err).Msg("systemctl stop cloudflared-restart.path error")
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := runCommand("systemctl", "stop", "cloudflared-update.timer"); err != nil {
|
if err := runCommand("systemctl", "stop", "cloudflared-update.timer"); err != nil {
|
||||||
log.Err(err).Msg("systemctl stop cloudflared-update.timer error")
|
log.Err(err).Msg("systemctl stop cloudflared-update.timer error")
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue