diff options
author | June McEnroe <june@causal.agency> | 2020-08-15 18:46:28 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-15 18:46:28 -0400 |
commit | 84a1f34b0c40625ff517b5ff132d2cf05cb85143 (patch) | |
tree | d6ff59052b5a3d32f9c01857043a47814890249b /catsit.sh | |
parent | Parse config later (diff) | |
download | catsit-84a1f34b0c40625ff517b5ff132d2cf05cb85143.tar.gz catsit-84a1f34b0c40625ff517b5ff132d2cf05cb85143.zip |
Check if pipe is writable in wrapper
Diffstat (limited to '')
-rw-r--r-- | catsit.sh | 3 |
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' |