Skip to content

Instantly share code, notes, and snippets.

@aliceinwire
Created July 27, 2015 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aliceinwire/4efa0cb15d271f85ddf3 to your computer and use it in GitHub Desktop.
Save aliceinwire/4efa0cb15d271f85ddf3 to your computer and use it in GitHub Desktop.
euscan command line
#!/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="alice.ferrazzi@gmail.com"
# Notification e-mail recipient:
GA_MAILTO="alice.ferrazzi@gmail.com"
# Notification e-mail secondary recipients:
#GA_MAILTO_CC="stefano@abc.com; danilo@abc.com"
# 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