#!/bin/bash . /etc/systemconfig lh_notify-send "Starting Backup..." #alert user the database will not be backed up if [ $SystemType != MasterBackend -a $SystemType != Standalone ] then lh_notify-send "This is not the Master backend.\n Skipping backup of database." fi if [ $SystemType = MasterBackend -o $SystemType = Standalone ] then backend_control.sh stop 127.0.0.1 fi #do the backup lh_system_backup_job 2>&1 > /var/run/backup.log rc=$? if [ $SystemType = MasterBackend -o $SystemType = Standalone ] then backend_control.sh start 127.0.0.1 fi if [ $rc = 0 ] then complete_message="Backup completed successfully." else complete_message="Backup failed." fi lh_notify-send "$complete_message"