Skip to content
Snippets Groups Projects
Commit 2dcbe1e6 authored by kohleman's avatar kohleman
Browse files

added automatic Mail on a change

SVN: 17404
parent 5f05db1f
No related merge requests found
...@@ -24,8 +24,10 @@ export PLATFORM=`uname -s` ...@@ -24,8 +24,10 @@ export PLATFORM=`uname -s`
if [ $PLATFORM = "SunOS" ]; if [ $PLATFORM = "SunOS" ];
then then
export LN=/usr/bin/ln export LN=/usr/bin/ln
export MAIL=/usr/bin/mailx
else else
export LN=/bin/ln export LN=/bin/ln
export MAIL=/bin/mailx
fi fi
umask 077 umask 077
...@@ -40,6 +42,7 @@ if [ $? -ne 0 ]; then ...@@ -40,6 +42,7 @@ if [ $? -ne 0 ]; then
rm $BACKUP_DIR/$SP rm $BACKUP_DIR/$SP
export LATEST_FILE=`ls -1rt $BACKUP_DIR/${SP}_* | tail -1` export LATEST_FILE=`ls -1rt $BACKUP_DIR/${SP}_* | tail -1`
$LN -s $LATEST_FILE $BACKUP_DIR/$SP $LN -s $LATEST_FILE $BACKUP_DIR/$SP
$MAIL -s "$PRODUCTIVE changed!" manuel.kohler@bsse.ethz.ch < $LATEST_FILE
fi fi
# openBIS DSS # openBIS DSS
...@@ -52,6 +55,7 @@ if [ $? -ne 0 ]; then ...@@ -52,6 +55,7 @@ if [ $? -ne 0 ]; then
rm $BACKUP_DIR/$DSS_SP rm $BACKUP_DIR/$DSS_SP
export LATEST_FILE=`ls -1rt $BACKUP_DIR/${DSS_SP}_* | tail -1` export LATEST_FILE=`ls -1rt $BACKUP_DIR/${DSS_SP}_* | tail -1`
$LN -s $LATEST_FILE $BACKUP_DIR/$DSS_SP $LN -s $LATEST_FILE $BACKUP_DIR/$DSS_SP
$MAIL -s "$DSS_PRODUCTIVE changed!" manuel.kohler@bsse.ethz.ch < $LATEST_FILE
fi fi
#/usr/bin/find $BACKUP_DIR -type f -mtime +$DAYS_TO_RETAIN -exec rm {} \; #/usr/bin/find $BACKUP_DIR -type f -mtime +$DAYS_TO_RETAIN -exec rm {} \;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment