Check if pipe is writable in wrapper

This commit is contained in:
C. McEnroe 2020-08-15 18:46:28 -04:00
parent 0d7303e75f
commit 84a1f34b0c
1 changed files with 3 additions and 0 deletions

View File

@ -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'