|
Lines 19-31
Link Here
|
| 19 |
name="bareos_dir" |
19 |
name="bareos_dir" |
| 20 |
rcvar=${name}_enable |
20 |
rcvar=${name}_enable |
| 21 |
command=%%PREFIX%%/sbin/bareos-dir |
21 |
command=%%PREFIX%%/sbin/bareos-dir |
|
|
22 |
bareos_dir_user="bareos" |
| 23 |
bareos_dir_group="bareos" |
| 24 |
start_precmd=${name}_prestart |
| 22 |
|
25 |
|
| 23 |
load_rc_config $name |
26 |
load_rc_config $name |
| 24 |
|
27 |
|
| 25 |
: ${bareos_dir_enable="NO"} |
28 |
: ${bareos_dir_enable="NO"} |
| 26 |
: ${bareos_dir_flags=" -u bareos -g bareos -v -c %%PREFIX%%/etc/bareos/bareos-dir.conf"} |
29 |
: ${bareos_dir_flags=" -u ${bareos_dir_user} -g ${bareos_dir_group} -v -c %%PREFIX%%/etc/bareos/bareos-dir.conf"} |
| 27 |
: ${bareos_dir_pidfile="/var/run/bareos/bareos-dir.9101.pid"} |
30 |
: ${bareos_dir_pidfile="/var/run/bareos/bareos-dir.9101.pid"} |
| 28 |
|
31 |
|
| 29 |
pidfile="${bareos_dir_pidfile}" |
32 |
pidfile="${bareos_dir_pidfile}" |
| 30 |
|
33 |
|
|
|
34 |
bareos_dir_prestart() |
| 35 |
{ |
| 36 |
install -d -m 770 ${pidfile%/*} && chown ${bareos_dir_user}:${bareos_dir_group} ${pidfile%/*} |
| 37 |
} |
| 38 |
|
| 39 |
|
| 31 |
run_rc_command "$1" |
40 |
run_rc_command "$1" |