service: enable systemd service.

This commit is contained in:
Daniel Theophanes
2015-01-18 17:48:14 -08:00
parent 919c073bb5
commit e2c71385b0
2 changed files with 6 additions and 0 deletions
View File
+6
View File
@@ -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