This website works better with JavaScript.
Home
Help
Sign In
nomis
/
server-scripts
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
folder copy with mutex
master
n0m1s
6 years ago
parent
39c1d8d9b7
commit
cb5ef43b99
1 changed files
with
15 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+15
-0
folder-copy.sh
+ 15
- 0
folder-copy.sh
View File
@ -0,0 +1,15 @@
#!/bin/bash
lockfile
=
lock
: >>
${
lockfile
}
exec
9>
${
lockfile
}
if
! flock -n
9
;
then
#Another instance is running
exit
1
fi
#TODO: rsync
: >
${
lockfile
}
Write
Preview
Loading…
Cancel
Save