diff --git a/icinga-cli.sh b/icinga-cli.sh index 4d4a782711b4ff58610e2f7b28b3ac00f9461f98..fa2340280f4e3533df46d21bba6dbfc54dc99738 100755 --- a/icinga-cli.sh +++ b/icinga-cli.sh @@ -313,8 +313,8 @@ function processCheck(){ # $myFullscript $myparams | tee $_outfile eval $myFullscript $myparams > $_outfile rc=$? - if [ $rc -ne 0 ]; then - echo "ERROR: unable to write file $_outfile. Maybe the setup is inclomplete or someone created a file as root." + if [ ! -w $_outfile ]; then + echo "ERROR: file $_outfile is not writable. Maybe the setup is inclomplete or someone created a file as root... just guessing." ls -ld ${dir_data} $_outfile exit 1 fi