Commit 06e4ff23 authored by m33m33's avatar m33m33
Browse files

added protection for aideCheck.sh 1st run wihtout aide being properly setup

parent 092e615c
...@@ -65,6 +65,13 @@ fi ...@@ -65,6 +65,13 @@ fi
echo "aideCheck.sh has sent you and AIDE report for: $MYHOST ($MYIP)" > $TMP.mailReport echo "aideCheck.sh has sent you and AIDE report for: $MYHOST ($MYIP)" > $TMP.mailReport
echo " ">> $TMP.mailReport echo " ">> $TMP.mailReport
if [ ! -f $AIDE_DB ]; then
echo "Error: AIDE Database missing ($AIDE_DB)"
echo "You must run 'aide --init' to setup the first database, and generate the aide.conf configuration file"
echo "It should place requested files like $AIDE_DB $AIDE_DBNEW and a sample aide.conf file in /var/lib/aide"
exit 12
fi
# Run a diagonstic, this can take some time and CPU, be nice # Run a diagonstic, this can take some time and CPU, be nice
nice $AIDE --check 1>$TMP 2>&1 nice $AIDE --check 1>$TMP 2>&1
......
...@@ -121,7 +121,9 @@ function install { ...@@ -121,7 +121,9 @@ function install {
chmod 500 $DST chmod 500 $DST
echo "Remeber to:" echo "Remeber to:"
echo " "
echo "1. Run an initial aide --init to setup AIDE database" echo "1. Run an initial aide --init to setup AIDE database"
echo " "
echo "2. Add aideCheck.sh to your crontab, scheduler, or run it to peridically check this system" echo "2. Add aideCheck.sh to your crontab, scheduler, or run it to peridically check this system"
echo " Ex: add this to your crontab" echo " Ex: add this to your crontab"
echo " 30 */1 * * * $DST" echo " 30 */1 * * * $DST"
...@@ -132,6 +134,7 @@ function install { ...@@ -132,6 +134,7 @@ function install {
echo " " echo " "
} }
# #
# int main() # int main()
# #
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment