Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (23 sloc) 794 Bytes
#!/bin/bash -e
# This is a disabled hook example.
# To enable, make it executable: chmod +x /etc/tklbam/hooks.d/example
# hooks are always called with two arguments
echo -n "HOOK $0 :: op=$op state=$state pwd=$(pwd) :: "
if [ "$state" = "pre" ]; then
echo "BEFORE $op started"
elif [ "$state" = "inspect" ]; then
if [ "$op" = "restore" ]; then
echo "hook invoked after Duplicity downloads backup archive. Extras path = $(pwd)"
elif [ "$op" = "backup" ]; then
echo "hook invoked before Duplicity uploads backup archive. Extras path = $(pwd)"
elif [ "$state" = "post" ]; then
echo "AFTER $op finishes"
echo "bad hook invocation"
# `false` returns a non-zero exitcode
# Uncomment the next line to raise an error
Something went wrong with that request. Please try again.