service: enable systemd service.
This commit is contained in:
@@ -218,6 +218,10 @@ func (s *linuxService) Install() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if flavor == initSystemd {
|
if flavor == initSystemd {
|
||||||
|
err = exec.Command("systemctl", "enable", s.Name+".service").Run()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
return exec.Command("systemctl", "daemon-reload").Run()
|
return exec.Command("systemctl", "daemon-reload").Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,6 +426,8 @@ ConditionFileIsExecutable={{.Path}}
|
|||||||
StartLimitInterval=5
|
StartLimitInterval=5
|
||||||
StartLimitBurst=10
|
StartLimitBurst=10
|
||||||
ExecStart={{.Path}}
|
ExecStart={{.Path}}
|
||||||
|
Restart=always
|
||||||
|
RestartSec=120
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user