mirror of
https://abf.rosa.ru/djam/postgresql-pgpool-II.git
synced 2025-02-23 15:12:46 +00:00
16 lines
311 B
Text
16 lines
311 B
Text
![]() |
#!/bin/sh
|
||
|
|
||
|
ARCHIVING_LOCK="archiving_enabled"
|
||
|
BACKUP_LOCK="backup_in_progress"
|
||
|
DEST="../archive/$2"
|
||
|
RETVAL=0
|
||
|
if [ -f "$ARCHIVING_LOCK" -o ! -f "$BACKUP_LOCK" ]; then
|
||
|
touch "$BACKUP_LOCK"
|
||
|
if [ ! -f "$DEST" ]; then
|
||
|
install -m600 "$1" -D "$DEST"
|
||
|
RETVAL=$?
|
||
|
fi
|
||
|
rm -f "$BACKUP_LOCK"
|
||
|
fi
|
||
|
exit $RETVAL
|