summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-12-18 11:07:48 +0100
committermakefu <github@syntax-fehler.de>2015-12-18 11:07:54 +0100
commitfe3b2ecb0aaf7d863842b896e18cd2b829f2297b (patch)
tree3ca2710f5c6ab5c977041a4959a3c9a6b9152bb9
parented1de450240582ce034ee5d0da918c236c3d199f (diff)
cac: shutdown if update fails
-rwxr-xr-xcac4
1 files changed, 3 insertions, 1 deletions
diff --git a/cac b/cac
index e25c54f..b9982b2 100755
--- a/cac
+++ b/cac
@@ -121,6 +121,7 @@ __cac_cli__resources() {
#?
__cac_cli__update() {(
umask 0077
+ pids=""
for x in \
resources \
servers \
@@ -134,8 +135,9 @@ __cac_cli__update() {(
echo $json | jq . > "$file".tmp
mv "$file".tmp "$file"
} &
+ pids="$pids $!"
done
- wait
+ for pid in $pids; do wait $pid;done
)}
#? cac getserver SERVERSPEC