source: src-sh/lpreserver/backend/runrep.sh @ ac48c86

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since ac48c86 was ac48c86, checked in by Kris Moore <kris@…>, 14 months ago

Change e-mail subject, so we can at a glance see result of snapshot / replication

  • Property mode set to 100755
File size: 798 bytes
Line 
1#!/bin/sh
2# Do the replication for a specific dataset
3######################################################################
4
5# Set our vars
6PROGDIR="/usr/local/share/lpreserver"
7
8# Source our functions
9. /usr/local/share/pcbsd/scripts/functions.sh
10. ${PROGDIR}/backend/functions.sh
11
12DATASET="${1}"
13TIME="${2}"
14
15if [ -z "${DATASET}" ]; then
16  exit_err "No dataset specified!"
17fi
18
19check_rep_task "$DATASET" "$TIME"
20status=$?
21
22# No replication was needed / done
23if [ $DIDREP -eq 0 ] ; then exit 0 ; fi
24
25if [ $status -eq 0 ] ; then
26  title="Success"
27else
28  title="FAILED"
29fi
30
31case $EMAILMODE in
32    ALL) email_msg "$title - Automated Replication" "`echo_queue_msg`" ;;
33    *) if [ $status -ne 0 ] ; then
34          email_msg "$title - Automated Replication" "`echo_queue_msg`"
35       fi
36       ;;
37esac
Note: See TracBrowser for help on using the repository browser.