|
@@ -4,17 +4,14 @@ dir="$(dirname $(readlink -f "${0}"))"
|
4
|
4
|
|
5
|
5
|
cp "${dir}/git-backup" /usr/local/bin &&
|
6
|
6
|
|
7
|
|
-if [ ! -x /etc/cron.d/git-backup ]
|
|
7
|
+if [ ! -f /etc/git-backup.conf ]
|
8
|
8
|
then
|
9
|
|
- if [ ! -x /etc/git-backup.conf ]
|
10
|
|
- then
|
11
|
|
- cp "${dir}/git-backup.conf" /etc/git-backup.conf
|
12
|
|
- fi &&
|
|
9
|
+ cp "${dir}/git-backup.conf" /etc/git-backup.conf
|
|
10
|
+fi &&
|
13
|
11
|
|
14
|
|
- if [ ! -x /etc/cron.d/git-backup ]
|
15
|
|
- then
|
16
|
|
- echo "00 2 * * * root git-backup > /dev/null" > /etc/cron.d/git-backup
|
17
|
|
- fi &&
|
|
12
|
+if [ ! -f /etc/cron.d/git-backup ]
|
|
13
|
+then
|
|
14
|
+ echo "00 2 * * * root git-backup > /dev/null" > /etc/cron.d/git-backup &&
|
18
|
15
|
service cron reload
|
19
|
16
|
fi &&
|
20
|
17
|
|