summaryrefslogtreecommitdiff
blob: c2f8f85a4c415cce00b035ec1ef0a1ed9435d805 (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
28
29
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/mcollective/files/mcollectived.initd,v 1.1 2011/03/01 02:18:33 ramereth Exp $

mcollectived="/usr/sbin/mcollectived"
pidfile="/var/run/mcollectived"

depend() {
    need net
}

start() {
    ebegin "Starting mcollectived"
    ${mcollectived} --pid=${pidfile} --config="/etc/mcollective/server.cfg"
    eend $?
}

stop() {
    ebegin "Stopping mcollectived"
    kill `cat ${pidfile}`
    eend $?
}

restart() {
    svc_stop
    sleep 2
    svc_start
}