Add locking into GNOME backup script
This commit is contained in:
parent
a84df969da
commit
7f78117fea
1 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f /var/lock/gnome_backup.lock ];
|
||||||
|
then
|
||||||
|
quit "Lockfile exists.. Remove /var/lock/gnome_backup.lock"
|
||||||
|
else
|
||||||
|
echo $$ > /var/lock/gnome_backup.lock
|
||||||
|
# Make VERY sure the lock file is made
|
||||||
|
touch /var/lock/gnome_backup.lock
|
||||||
|
exit
|
||||||
|
|
||||||
# backup.sh will run FROM backup03 TO the various GNOME boxes on the set. (there's two set
|
# backup.sh will run FROM backup03 TO the various GNOME boxes on the set. (there's two set
|
||||||
# of machines, one being the ones with a public IP and the others being the IP-less ones that
|
# of machines, one being the ones with a public IP and the others being the IP-less ones that
|
||||||
# will forward their agent through bastion.gnome.org)
|
# will forward their agent through bastion.gnome.org)
|
||||||
|
@ -50,3 +59,6 @@ done
|
||||||
|
|
||||||
# Dailyreport needs the logs to generate the data we need.
|
# Dailyreport needs the logs to generate the data we need.
|
||||||
cd $LOGS_DIR && scp -i /fedora_backups/gnome/backup_id.rsa * $BACKUP_USER@combobox.gnome.org:/home/admin/backup-logs
|
cd $LOGS_DIR && scp -i /fedora_backups/gnome/backup_id.rsa * $BACKUP_USER@combobox.gnome.org:/home/admin/backup-logs
|
||||||
|
|
||||||
|
|
||||||
|
rm -f /var/lock/gnome_backup.lock
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue