summaryrefslogtreecommitdiff
blob: 006ff28a7750b8099c0231e6ae0dadf7b0a788cf (plain)
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
27
#!/sbin/runscript

depend() {
    clock
}

checkconfig() {
    if [ ! -e /etc/metalog/metalog.conf ] ; then
	eerror "You need an /etc/metalog/metalog.conf file to run metalog"
	eerror "There is a sample config  file in /usr/share/docs/metalog"
	return 1
    fi
}

start() {
    checkconfig || return 1
    ebegin "Starting metalog"
    start-stop-daemon --start --quiet --exec /usr/sbin/metalog -- -B
    eend $?
}

stop() {
    ebegin "Stopping metalog"
    start-stop-daemon --stop --quiet --exec /usr/sbin/metalog
    eend $?
    # will look into cosmetic error message later..~dd
}