This commit is contained in:
James Barnett
2017-06-03 19:55:01 -04:00
parent bd109348b1
commit 043bfe8bd2

View File

@@ -30,7 +30,7 @@ version="0.4"
name="snap-sync" name="snap-sync"
# The following line is modified by the Makefile # The following line is modified by the Makefile
SNAPPER_CONFIG=/etc/sysconfig/snapper SNAPPER_CONFIG=/etc/conf.d/snapper
TMPDIR=$(mktemp -d) TMPDIR=$(mktemp -d)
PIPE=$TMPDIR/$name.out PIPE=$TMPDIR/$name.out
@@ -70,7 +70,7 @@ trapkill() {
} }
[[ $EUID -ne 0 ]] && die "Script must be run as root." [[ $EUID -ne 0 ]] && die "Script must be run as root."
! [[ -f $SNAPPER_CONFIG ]] && die "$SNAPPER_CONFIG does not exist." [[ -f $SNAPPER_CONFIG ]] || die "$SNAPPER_CONFIG does not exist."
trap 'traperror ${LINENO} $? "$BASH_COMMAND" $BASH_LINENO "${FUNCNAME[@]}"' ERR trap 'traperror ${LINENO} $? "$BASH_COMMAND" $BASH_LINENO "${FUNCNAME[@]}"' ERR
trap trapkill SIGTERM SIGINT trap trapkill SIGTERM SIGINT