Skip to content

Commit

Permalink
Update gen000140-x.sh
Browse files Browse the repository at this point in the history
Updated to check AIDE was previously configured by script for multiple runs.
  • Loading branch information
fcaviggia committed May 27, 2014
1 parent 4bb9820 commit 0de7cf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion misc/gen000140-x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ echo '==================================================='

AIDE=`rpm -q aide`
if [ $? -eq 0 ]; then
echo "Initializing AIDE database, this may take a moment!"
if [ -e /var/lib/aide/aide.db.gz ]; then
echo "AIDE Previously Configured."
else
echo "Initializing AIDE database, this step may take quite a while!"
/usr/sbin/aide --init &> /dev/null
echo "AIDE database initialization complete."
cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
Expand All @@ -27,6 +30,7 @@ if [ $? -eq 0 ]; then
echo "0 0 * * 0 /usr/sbin/aide --check > /var/log/aide/reports/$HOSTNAME-AIDEREPORT.txt 2>&1" >> /var/spool/cron/root
chmod 600 /var/spool/cron/root
fi
fi
else
echo "FINDING: AIDE NOT INSTALLED."
fi

0 comments on commit 0de7cf5

Please sign in to comment.