mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 13:18:35 -06:00
Make sure only one instance is running using flock
This commit is contained in:
parent
648531c3cd
commit
6465b5e9a6
1 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
# This script backs up some important stuff
|
# This script backs up some important stuff
|
||||||
|
|
||||||
|
# Run only one instance of this script at one time
|
||||||
|
[ "${BKLOCKER}" != "running" ] && exec env BKLOCKER="running" flock -en "/tmp/impfilesbk" "$0" "$@" || :
|
||||||
|
|
||||||
# Setup location for home and backup directory
|
# Setup location for home and backup directory
|
||||||
HMDIR="/home/sintan"
|
HMDIR="/home/sintan"
|
||||||
BKDIR="/mnt/storage/sintan"
|
BKDIR="/mnt/storage/sintan"
|
||||||
|
|
Loading…
Reference in a new issue