mirror of
https://github.com/EnumeratedDev/enit.git
synced 2026-09-16 10:36:12 +00:00
Keep simple services running if exit method is "stop_command"
This commit is contained in:
+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