just some silly refactoring

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2017-12-16 00:36:32 +03:00
parent 873f0f6809
commit c48486cacf

8
ssm
View File

@ -415,10 +415,9 @@ main() {
svc_pidfile="$rundir/$service_name.pid"
# Get the service defaults
for p in "${cfg_path[@]}"; do
[[ -f "$p/conf.d/$service_name" ]] && {
source "$p/conf.d/$service_name" || die 5 "Failed to read service defaults: $p/conf.d/$service_name"
break
for p in "${cfg_path[@]/%//$service_name}"; do
[[ -f "$p" ]] && {
source "$p" || die 5 "Failed to read service defaults: $p"
}
done
@ -431,7 +430,6 @@ main() {
[[ "$service_type" == 'oneshot' ]] && service_oneshot=1
(( service_oneshot )) && service_managed=0
[[ "$service_pidfile" ]] && service_managed=0
if ! (( service_managed )); then