just some silly refactoring
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
873f0f6809
commit
c48486cacf
8
ssm
8
ssm
|
@ -415,10 +415,9 @@ main() {
|
||||||
svc_pidfile="$rundir/$service_name.pid"
|
svc_pidfile="$rundir/$service_name.pid"
|
||||||
|
|
||||||
# Get the service defaults
|
# Get the service defaults
|
||||||
for p in "${cfg_path[@]}"; do
|
for p in "${cfg_path[@]/%//$service_name}"; do
|
||||||
[[ -f "$p/conf.d/$service_name" ]] && {
|
[[ -f "$p" ]] && {
|
||||||
source "$p/conf.d/$service_name" || die 5 "Failed to read service defaults: $p/conf.d/$service_name"
|
source "$p" || die 5 "Failed to read service defaults: $p"
|
||||||
break
|
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -431,7 +430,6 @@ main() {
|
||||||
[[ "$service_type" == 'oneshot' ]] && service_oneshot=1
|
[[ "$service_type" == 'oneshot' ]] && service_oneshot=1
|
||||||
|
|
||||||
(( service_oneshot )) && service_managed=0
|
(( service_oneshot )) && service_managed=0
|
||||||
|
|
||||||
[[ "$service_pidfile" ]] && service_managed=0
|
[[ "$service_pidfile" ]] && service_managed=0
|
||||||
|
|
||||||
if ! (( service_managed )); then
|
if ! (( service_managed )); then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user