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

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

Add --replicate option to "mksnap" to force immediate replication

  • Property mode set to 100755
File size: 868 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 [ "$TIME" = "force" ] ; then
26  type="Manual" 
27else
28  type="Automated" 
29fi
30
31if [ $status -eq 0 ] ; then
32  title="Success"
33else
34  title="FAILED"
35fi
36
37case $EMAILMODE in
38    ALL) email_msg "$title - $type Replication" "`echo_queue_msg`" ;;
39    *) if [ $status -ne 0 ] ; then
40          email_msg "$title - $type Replication" "`echo_queue_msg`"
41       fi
42       ;;
43esac
Note: See TracBrowser for help on using the repository browser.