Skip to content

Commit 40cbd79

Browse files
authored
Merge pull request #2557 from pqarmitage/updates
samples: ensure sample_notify_fifo.sh has write access to PID_DIR
2 parents d178d93 + 4e421fd commit 40cbd79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/samples/sample_notify_fifo.sh

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ elif [[ -d /var/run ]]; then
3333
else
3434
PID_DIR=/tmp
3535
fi
36+
37+
# Ensure we have write access to PID_DIR, otherwise use /tmp
38+
[[ ! -w $PID_DIR ]] && PID_DIR=/tmp
39+
3640
PID_FILE=$PID_DIR/${FIFO##*/}.pid
3741

3842
exiting()

0 commit comments

Comments
 (0)