mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-27 04:13:45 +03:00
improved cron script to report any malfunction by email
This commit is contained in:
parent
a24eaffacc
commit
640e0eecc6
|
@ -6,9 +6,18 @@
|
||||||
SQLMAP_HOME="/opt/sqlmap"
|
SQLMAP_HOME="/opt/sqlmap"
|
||||||
REGRESSION_SCRIPT="${SQLMAP_HOME}/extra/shutils"
|
REGRESSION_SCRIPT="${SQLMAP_HOME}/extra/shutils"
|
||||||
|
|
||||||
|
FROM="regressiontest@sqlmap.org"
|
||||||
|
TO="bernardo.damele@gmail.com, miroslav.stampar@gmail.com"
|
||||||
|
SUBJECT="Automated regression test failed on $(date)"
|
||||||
|
|
||||||
cd $SQLMAP_HOME
|
cd $SQLMAP_HOME
|
||||||
git pull
|
git pull
|
||||||
rm -f output 2>/dev/null
|
rm -f output 2>/dev/null
|
||||||
|
|
||||||
cd $REGRESSION_SCRIPT
|
cd $REGRESSION_SCRIPT
|
||||||
python regressiontest.py
|
python regressiontest.py 1>/tmp/regressiontest.log 2>&1
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
cat /tmp/regressiontest.log | mailx -s "${SUBJECT}" -aFrom:${FROM} ${TO}
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user