View | Details | Raw Unified | Return to bug 221593
Collapse All | Expand All

(-)bareos-dir (+18 lines)
Lines 30-39 Link Here
30
command=/usr/local/sbin/bareos-dir
30
command=/usr/local/sbin/bareos-dir
31
command_args="-c ${bareos_dir_config}"
31
command_args="-c ${bareos_dir_config}"
32
pidfile="${bareos_dir_pidfile}"
32
pidfile="${bareos_dir_pidfile}"
33
bconsole_command=/usr/local/bin/bconsole
33
start_precmd="bareos_start_precmd"
34
start_precmd="bareos_start_precmd"
35
restart_precmd="bareos_dir_configtest"
36
reload_precmd="bareos_dir_configtest"
37
reload_cmd="bareos_dir_reload"
38
configtest_cmd="bareos_dir_configtest"
34
39
35
bareos_start_precmd() {
40
bareos_start_precmd() {
36
	[ -d "${pidfile%/*}" ] || install -d -o bareos -g bareos ${pidfile%/*}
41
	[ -d "${pidfile%/*}" ] || install -d -o bareos -g bareos ${pidfile%/*}
42
	bareos_dir_configtest
37
}
43
}
38
44
45
bareos_dir_configtest() {
46
	echo "Performing sanity check on ${bareos_dir_config} configuration:"
47
	eval ${command} -t
48
}
49
50
bareos_dir_reload() {
51
	echo "Performing a graceful reload"
52
	# bconsole always exits with 0, so we can't check the return status for success.
53
	echo "reload" | ${bconsole_command}
54
}
55
56
extra_commands="reload configtest"
39
run_rc_command "$1"
57
run_rc_command "$1"

Return to bug 221593