PIPE
Seems to be the answer. Adding PIPE to the list of signals trapped by
the script causes it to clean up on exit when the job is killed from the
web interface.
trap "cleanup ; trap - INT ; kill -INT $$" INT
trap "cleanup ; exit $?" TERM ABRT ALRM PIPE
is the snippet that works. cleanup is a
I have a bash script that runs on the BackupPC server as DumpPreUserCmd.
I'd like to have the script catch a signal and clean up it's files if a
backup get's canceled while the script is running. So far I'm trapping
INT, TERM, ABRT and ALRM but not getting what I want.
Does BackupPC send SIGKIL