-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
26 lines (21 loc) · 622 Bytes
/
run
File metadata and controls
26 lines (21 loc) · 622 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
: ${BACULA_SDNAME:="bacula-sd"}
: ${BACULA_SDPASSWORD:="password"}
: ${BACULA_DIRNAME:="bacula"}
: ${BACULA_MONNAME:="${BACULA_DIRNAME}-mon"}
: ${BACULA_MONSDPASSWORD:="${BACULA_SDPASSWORD}"}
: ${BACULA_DEBUG:="50"}
CONFIGS_VARS=(
BACULA_SDNAME
BACULA_SDPASSWORD
BACULA_DIRNAME
BACULA_MONNAME
BACULA_MONSDPASSWORD
)
for c in ${CONFIGS_VARS[@]}; do
sed -i "s,@@${c}@@,$(eval echo \$$c)," /etc/bacula/bacula-sd.conf
done
echo "==> Verifying Bacula SD configuration"
bacula-sd -t -c /etc/bacula/bacula-sd.conf
echo "==> Starting Bacula SD"
bacula-sd -f -d ${BACULA_DEBUG} -c /etc/bacula/bacula-sd.conf