summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-15 18:46:28 -0400
committerJune McEnroe <june@causal.agency>2020-08-15 18:46:28 -0400
commit84a1f34b0c40625ff517b5ff132d2cf05cb85143 (patch)
treed6ff59052b5a3d32f9c01857043a47814890249b
parentParse config later (diff)
downloadcatsit-84a1f34b0c40625ff517b5ff132d2cf05cb85143.tar.gz
catsit-84a1f34b0c40625ff517b5ff132d2cf05cb85143.zip
Check if pipe is writable in wrapper
-rw-r--r--catsit.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/catsit.sh b/catsit.sh
index bc18a46..0e2a7e1 100644
--- a/catsit.sh
+++ b/catsit.sh
@@ -19,6 +19,9 @@ shift $((OPTIND - 1))
 if ! [ -p "${CATSITD_PIPE}" ]; then
 	die "${CATSITD_PIPE} is not a named pipe"
 fi
+if ! [ -w "${CATSITD_PIPE}" ]; then
+	die "${CATSITD_PIPE} is not writable"
+fi
 
 [ $# -lt 1 ] && die 'action required'
 [ $# -lt 2 ] && die 'service name required'