ddns-scripts: variable quoting

in case spaces should creep into path names

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2024-11-30 19:16:11 +01:00
committed by Florian Eckert
parent 6b9b6fdace
commit 6706a5bd78

View File

@@ -147,19 +147,19 @@ case "$1" in
;; ;;
start) start)
[ -z "$SECTION" ] && usage_err "command 'start': 'SECTION' not set" [ -z "$SECTION" ] && usage_err "command 'start': 'SECTION' not set"
if [ $VERBOSE -eq 0 ]; then # start in background if [ "$VERBOSE" -eq 0 ]; then # start in background
$DDNSPRG -v 0 -S $SECTION -- start & "$DDNSPRG" -v 0 -S "$SECTION" -- start &
else else
$DDNSPRG -v $VERBOSE -S $SECTION -- start "$DDNSPRG" -v "$VERBOSE" -S "$SECTION" -- start
fi fi
;; ;;
reload) reload)
$DDNSPRG -- reload "$DDNSPRG" -- reload
;; ;;
restart) restart)
$DDNSPRG -- stop "$DDNSPRG" -- stop
sleep 1 sleep 1
$DDNSPRG -- start "$DDNSPRG" -- start
;; ;;
*) *)
__RET=255 __RET=255
@@ -167,6 +167,6 @@ case "$1" in
esac esac
# remove out and err file # remove out and err file
[ -f $DATFILE ] && rm -f $DATFILE [ -f "$DATFILE" ] && rm -f "$DATFILE"
[ -f $ERRFILE ] && rm -f $ERRFILE [ -f "$ERRFILE" ] && rm -f "$ERRFILE"
return $__RET return $__RET