Fix syntax errors

This commit is contained in:
David Coppit
2015-06-24 06:39:54 -04:00
parent 0bb0d595c0
commit 892e9574ec

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
function ts { function ts {
echo [`date '+%b %d %X' MASTER:`] echo [`date '+%b %d %X'`] MASTER:
} }
echo "$(ts) Starting master controller" echo "$(ts) Starting master controller"
@@ -24,7 +24,7 @@ fi
PIDS=() PIDS=()
for $CONFIG_FILE in "${CONFIG_FILES[@]}" for CONFIG_FILE in "${CONFIG_FILES[@]}"
do do
echo "$(ts) Launching monitor for $CONFIG_FILE" echo "$(ts) Launching monitor for $CONFIG_FILE"
/root/monitor.sh $CONFIG_FILE & /root/monitor.sh $CONFIG_FILE &
@@ -45,7 +45,7 @@ do
echo "$(ts) Monitor for ${CONFIG_FILES[$i]} has died (PID ${PIDS[$i]}). Killing other monitors and exiting." echo "$(ts) Monitor for ${CONFIG_FILES[$i]} has died (PID ${PIDS[$i]}). Killing other monitors and exiting."
for $PID in "${PIDS[@]}" for PID in "${PIDS[@]}"
do do
kill -9 $PID >/dev/null 2>&1 kill -9 $PID >/dev/null 2>&1
done done