mirror of
https://github.com/EnumeratedDev/enit.git
synced 2026-10-31 18:51:48 +00:00
Keep simple services running if exit method is "stop_command"
This commit is contained in:
1 parent
b3565cb9e1
commit
3c1d39831f
1 file changed
+5
-1
+5
-1
@@ -215,7 +215,11 @@ func (service *EnitService) StartService() error {
|
|||||||
default:
|
default:
|
||||||
if service.Type == "simple" && err == nil {
|
if service.Type == "simple" && err == nil {
|
||||||
service.restartCount = 0
|
service.restartCount = 0
|
||||||
_ = service.setCurrentState(EnitServiceCompleted)
|
if service.ExitMethod != "stop_command" {
|
||||||
|
_ = service.setCurrentState(EnitServiceCompleted)
|
||||||
|
} else {
|
||||||
|
_ = service.setCurrentState(EnitServiceRunning)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !service.CrashOnSafeExit {
|
if !service.CrashOnSafeExit {
|
||||||
|
|||||||
Reference in new issue
Block a user