Skip to content

Commit

Permalink
Removed bashism from check_checkrestart.sh
Browse files Browse the repository at this point in the history
The script targets Debian, where dash, the default 'sh' interpreter, raise an error because of `$EUID`. Now it correctly works.
  • Loading branch information
soujak committed Mar 22, 2016
1 parent afccc9b commit 794fe14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_checkrestart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ package=check_checkrestart
checkrestart=/usr/sbin/checkrestart

# use sudo for nrpe server running under nagios user
if [ $EUID -ne 0 ] ; then
if [ "$(id -u)" -ne 0 ] ; then
checkrestart="sudo ${checkrestart}"
fi

Expand Down

0 comments on commit 794fe14

Please sign in to comment.