Close the if and put lockfile in home
This commit is contained in:
parent
7f78117fea
commit
d3f7fb49ba
1 changed files with 7 additions and 6 deletions
|
@ -1,13 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
LOCKFILE=/fedora_backups/gnome/backup.lock
|
||||||
|
|
||||||
if [ -f /var/lock/gnome_backup.lock ];
|
if [ -f $LOCKFILE ];
|
||||||
then
|
then
|
||||||
quit "Lockfile exists.. Remove /var/lock/gnome_backup.lock"
|
quit "Lockfile exists.. Remove $LOCKFILE"
|
||||||
else
|
else
|
||||||
echo $$ > /var/lock/gnome_backup.lock
|
echo $$ > $LOCKFILE
|
||||||
# Make VERY sure the lock file is made
|
# Make VERY sure the lock file is made
|
||||||
touch /var/lock/gnome_backup.lock
|
touch $LOCKFILE || exit
|
||||||
exit
|
fi
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -61,4 +62,4 @@ done
|
||||||
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
|
rm -f $LOCKFILE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue