You're correct...I noticed that my fix didn't work after my last reboot, but not for the reason you specified. The original version of the script removes the directory unconditionally. The "-d" argument to the install command causes the directory to be created, so the directory's absence is not an issue.
Rather than use the short conditional, I used a full conditional and it seems to work.
if [ -d "$RUNDIR" ]; then
rm -rf "$RUNDIR" || return 1
fi
You're correct...I noticed that my fix didn't work after my last reboot, but not for the reason you specified. The original version of the script removes the directory unconditionally. The "-d" argument to the install command causes the directory to be created, so the directory's absence is not an issue.
Rather than use the short conditional, I used a full conditional and it seems to work.
if [ -d "$RUNDIR" ]; then
rm -rf "$RUNDIR" || return 1
fi