Created
February 17, 2020 20:43
-
-
Save tomhat/318b63a10b9004295d7ee08f6e7c60e2 to your computer and use it in GitHub Desktop.
Update Aide+logging Shell Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LOGTIME=`date +'%Y%m%d'` | |
echo "start:`date +'%Y/%m/%d %H:%M:%S'`" >> /home/hatabo/shell/aide/aide$LOGTIME.log | |
/usr/sbin/aide --update >> /home/hatabo/shell/aide/aide$LOGTIME.log | |
echo "copy aide.db.new.gz => /var/lib/aide/aide.db.gz" >> /home/hatabo/shell/aide/aide$LOGTIME.log | |
/bin/cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz | |
echo "start:`date +'%Y/%m/%d %H:%M:%S'`" >> /home/hatabo/shell/aide/aide$LOGTIME.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment