Created
July 27, 2015 11:18
-
-
Save aliceinwire/4efa0cb15d271f85ddf3 to your computer and use it in GitHub Desktop.
euscan command line
This file contains hidden or 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 | |
# This script is meant to be run as a cron job to update a gentoo system automatically | |
set -e | |
GA_LOGFILE="/var/log/euscan-check.log" | |
# which package to monitor divided by space | |
PACKAGE="" | |
# Notification e-mail sender (could be fake): | |
GA_MAILFROM="[email protected]" | |
# Notification e-mail recipient: | |
GA_MAILTO="[email protected]" | |
# Notification e-mail secondary recipients: | |
#GA_MAILTO_CC="[email protected]; [email protected]" | |
# Notification e-mail subject: | |
GA_SUBJECT="[IMPORTANT] Gentoo Euscan report $(date)" | |
echo "Starting euscan check on $(date)" > $GA_LOGFILE | |
# Redirect output | |
exec 1>>$GA_LOGFILE | |
exec 2>>$GA_LOGFILE | |
echo | |
#echo "Starting system update on $(date)" | |
echo "-----------------------------------------------------" | |
euscan -q $PACKAGE | |
echo "-----------------------------------------------------" | |
/bin/mail -v -s "$GA_SUBJECT" $GA_MAILTO_CC $GA_MAILTO < $GA_LOGFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment