summaryrefslogtreecommitdiff
blob: 5884c42428022af62055c88205afcf4b5cce2e4c (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-2012 Gentoo Foundation
# Distributed under the terms of the Apache License, Version 2.0
# $Header: /var/cvsroot/gentoo-x86/app-admin/mcollective/files/mcollectived.initd,v 1.2 2012/12/24 08:29:38 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
}