aboutsummaryrefslogtreecommitdiff
path: root/bin/nwatch
diff options
context:
space:
mode:
Diffstat (limited to 'bin/nwatch')
-rwxr-xr-xbin/nwatch6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/nwatch b/bin/nwatch
index 6a35f84..6aaa076 100755
--- a/bin/nwatch
+++ b/bin/nwatch
@@ -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