From bfa9d72c8d902c65c4db5755324856371e8a13c0 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 20 Feb 2018 22:49:36 +0100 Subject: [PATCH] Fix service file wildcard expansion --- osync-srv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osync-srv b/osync-srv index 2103998..abf2581 100755 --- a/osync-srv +++ b/osync-srv @@ -36,14 +36,14 @@ if [ ! -w $(dirname $pidfile) ]; then fi start() { - if [ ! -f $confdir/*.conf ]; then + if ! ls "$confdir/"*.conf > /dev/null 2>&1; then echo "Cannot find any configuration files in $confdir." exit 1 fi errno=0 - for cfgfile in $confdir/*.conf + for cfgfile in "$confdir/"*.conf do if [ -f $progpath/$progexec ]; then $progpath/$progexec $cfgfile --on-changes --errors-only > /dev/null 2>&1 &