diff --git a/ssm b/ssm index 7ca191b..e361f28 100755 --- a/ssm +++ b/ssm @@ -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