diff options
-rwxr-xr-x | bin/nwatch | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -37,7 +37,7 @@ latest=$cachedir/${self}.scan.latest # If the cachedir doesn't exist, attempt to create it, otherwise give up if [[ ! -d "$cachedir" ]] ; then if ! mkdir -- "$cachedir" ; then - exit + exit 1 fi fi @@ -48,7 +48,7 @@ diff=$cachedir/${self}.diff.${date} # Run the scan or give up if ! nmap -v -T4 -sV -iL "$hostlist" -oA "$cache" >/dev/null ; then - exit + exit 1 fi # If the link to the XML file is legible, run the diff or give up @@ -58,7 +58,7 @@ if [[ -r ${latest}.xml ]] ; then # Because we always want a report, only exit if an actual error condition # (1 means there's a meaningful diff in the scans) if (($? == 2)) ; then - exit + exit 1 fi fi |