File tree 6 files changed +15
-15
lines changed
6 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -19,19 +19,19 @@ FUNCTIONS=/home/backup/scripts/backup/functions.sh
19
19
SETTINGS=/home/backup/scripts/backup/settings.ini
20
20
DATE=" $( date +%Y%m%d) "
21
21
22
- [ -e " $FUNCTIONS " ] || exit 1
22
+ [[ -e " $FUNCTIONS " ] ] || exit 1
23
23
source " $FUNCTIONS "
24
24
25
25
# parse settings
26
- [ -e " $SETTINGS " ] || exit 1
26
+ [[ -e " $SETTINGS " ] ] || exit 1
27
27
cfg_parser " $SETTINGS "
28
28
29
29
# read variables in [etc] section
30
30
cfg.section.etc
31
31
32
32
# Check for the existence of the backup directory and create
33
33
# it if it doesn't exist.
34
- if [ ! -d " $backup_dir " ]
34
+ if [[ ! -d " $backup_dir " ] ]
35
35
then
36
36
mkdir -p " $backup_dir "
37
37
fi
Original file line number Diff line number Diff line change @@ -19,19 +19,19 @@ FUNCTIONS=/home/backup/scripts/backup/functions.sh
19
19
SETTINGS=/home/backup/scripts/backup/settings.ini
20
20
DATE=" $( date +%Y%m%d) "
21
21
22
- [ -e " $FUNCTIONS " ] || exit 1
22
+ [[ -e " $FUNCTIONS " ] ] || exit 1
23
23
source " $FUNCTIONS "
24
24
25
25
# parse settings
26
- [ -e " $SETTINGS " ] || exit 1
26
+ [[ -e " $SETTINGS " ] ] || exit 1
27
27
cfg_parser " $SETTINGS "
28
28
29
29
# read variables in [mysql] section
30
30
cfg.section.mysql
31
31
32
32
# Check for the existence of the backup directory and create
33
33
# it if it doesn't exist.
34
- if [ ! -d " $backup_dir " ]
34
+ if [[ ! -d " $backup_dir " ] ]
35
35
then
36
36
mkdir -p " $backup_dir "
37
37
fi
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ FUNCTIONS=/home/backup/scripts/backup/functions.sh
19
19
SETTINGS=/home/backup/scripts/backup/settings.ini
20
20
DATE=" $( date +%Y%m%d) "
21
21
22
- [ -e " $FUNCTIONS " ] || exit 1
22
+ [[ -e " $FUNCTIONS " ] ] || exit 1
23
23
source " $FUNCTIONS "
24
24
25
25
# parse settings
26
- [ -e " $SETTINGS " ] || exit 1
26
+ [[ -e " $SETTINGS " ] ] || exit 1
27
27
cfg_parser " $SETTINGS "
28
28
29
29
# read variables in [postgres] section
@@ -35,7 +35,7 @@ export PGPASSWORD="$password"
35
35
36
36
# Check for the existence of the backup directory and create
37
37
# it if it doesn't exist.
38
- if [ ! -d " $backup_dir " ]
38
+ if [[ ! -d " $backup_dir " ] ]
39
39
then
40
40
mkdir -p " $backup_dir "
41
41
fi
Original file line number Diff line number Diff line change 18
18
FUNCTIONS=/home/backup/scripts/backup/functions.sh
19
19
SETTINGS=/home/backup/scripts/backup/settings.ini
20
20
21
- [ -e " $FUNCTIONS " ] || exit 1
21
+ [[ -e " $FUNCTIONS " ] ] || exit 1
22
22
source " $FUNCTIONS "
23
23
24
24
# parse settings
25
- [ -e " $SETTINGS " ] || exit 1
25
+ [[ -e " $SETTINGS " ] ] || exit 1
26
26
cfg_parser " $SETTINGS "
27
27
28
28
# read which sections to clean
Original file line number Diff line number Diff line change 18
18
FUNCTIONS=/home/backup/scripts/backup/functions.sh
19
19
SETTINGS=/home/backup/scripts/backup/settings.ini
20
20
21
- [ -e " $FUNCTIONS " ] || exit 1
21
+ [[ -e " $FUNCTIONS " ] ] || exit 1
22
22
source " $FUNCTIONS "
23
23
24
24
# parse settings
25
- [ -e " $SETTINGS " ] || exit 1
25
+ [[ -e " $SETTINGS " ] ] || exit 1
26
26
cfg_parser " $SETTINGS "
27
27
28
28
# read variables in [mysql] section
Original file line number Diff line number Diff line change 18
18
FUNCTIONS=/home/backup/scripts/backup/functions.sh
19
19
SETTINGS=/home/backup/scripts/backup/settings.ini
20
20
21
- [ -e " $FUNCTIONS " ] || exit 1
21
+ [[ -e " $FUNCTIONS " ] ] || exit 1
22
22
source " $FUNCTIONS "
23
23
24
24
# parse settings
25
- [ -e " $SETTINGS " ] || exit 1
25
+ [[ -e " $SETTINGS " ] ] || exit 1
26
26
cfg_parser " $SETTINGS "
27
27
28
28
# read variables in [postgres] section
You can’t perform that action at this time.
0 commit comments