repo.or.cz
/
rsync_backup.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
create the host directory on first run
[rsync_backup.git]
/
backup_lock.sh
blob
dd500f0b6150c587c89de3599e58af31ad9679b5
1
2
#!/bin/sh
3
4
.
/
etc
/
conf.d
/
backup
5
6
if
[
-s
$PIDFILE
];
then
7
PID
=
$
(
cat
$PIDFILE
)
8
ps
$PID
> /
dev
/
null
9
if
[
$?
-eq
0
];
then
10
echo
"Backup already running(PID
$PID
), exiting"
11
exit
1
12
fi
13
fi
14
15
echo
$$
>
$PIDFILE
16