aboutsummaryrefslogtreecommitdiff
path: root/backup.in
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-03-21 13:34:51 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-03-21 13:34:51 +0200
commit6c6ab3125da430bdaafb9bacc88c32279a961525 (patch)
treeef8f4005504a8545eaab5b111890649ba0302d2c /backup.in
parent194f4b1204d6e49ba0af7dd761f8c794ba37c035 (diff)
downloadbeam-6c6ab3125da430bdaafb9bacc88c32279a961525.tar.gz
beam-6c6ab3125da430bdaafb9bacc88c32279a961525.tar.bz2
Prevent reentrant invocations. Minor bugfix.
At startup a pid file is checked. If it exists, another beam process is assumed to be running and start up is aborted. Otherwise a new pid file is created. The existing pid is removed before exiting (by epilogue_hook). * backup.in (prologue_hook): Prepend beam_lock. * lib/beam/common.in (backup_pidfile): New global. (beam_lock,beam_unlock): New functions. * lib/beam/s3.sh (s3_getmpoint): Fix regexp to take into account s3backer invocation without --vhost.
Diffstat (limited to 'backup.in')
-rw-r--r--backup.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/backup.in b/backup.in
index 615fa12..ca479b1 100644
--- a/backup.in
+++ b/backup.in
@@ -122,6 +122,7 @@ backup() {
}
umask ${backup_umask:-077}
+prologue_hook="beam_lock $prologue_hook"
if [ -n "$backup_logfile" ]; then
runhook openlog_hook

Return to:

Send suggestions and report system problems to the System administrator.