service(MacOS): launch only once
This commit is contained in:
parent
423f34dee1
commit
dbb23739b0
@ -112,6 +112,18 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
|
||||||
|
def launch_only_once(value = nil)
|
||||||
|
case T.unsafe(value)
|
||||||
|
when nil
|
||||||
|
@launch_only_once
|
||||||
|
when true, false
|
||||||
|
@launch_only_once = value
|
||||||
|
else
|
||||||
|
raise TypeError, "Service#launch_only_once expects a Boolean"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) }
|
sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) }
|
||||||
def restart_delay(value = nil)
|
def restart_delay(value = nil)
|
||||||
case T.unsafe(value)
|
case T.unsafe(value)
|
||||||
@ -291,6 +303,7 @@ module Homebrew
|
|||||||
}
|
}
|
||||||
|
|
||||||
base[:KeepAlive] = @keep_alive if @keep_alive == true
|
base[:KeepAlive] = @keep_alive if @keep_alive == true
|
||||||
|
base[:LaunchOnlyOnce] = @launch_only_once if @launch_only_once == false
|
||||||
base[:LegacyTimers] = @macos_legacy_timers if @macos_legacy_timers == true
|
base[:LegacyTimers] = @macos_legacy_timers if @macos_legacy_timers == true
|
||||||
base[:TimeOut] = @restart_delay if @restart_delay.present?
|
base[:TimeOut] = @restart_delay if @restart_delay.present?
|
||||||
base[:ProcessType] = @process_type.to_s.capitalize if @process_type.present?
|
base[:ProcessType] = @process_type.to_s.capitalize if @process_type.present?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user