| 1 |
#!/sbin/runscript
|
| 2 |
# Copyright 1999-2012 Gentoo Foundation
|
| 3 |
# Distributed under the terms of the GNU General Public License v2
|
| 4 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt-snmp/files/libvirt-snmp.initd,v 1.1 2011/05/11 08:57:32 dev-zero Exp $
|
| 5 |
|
| 6 |
depend() {
|
| 7 |
need snmpd
|
| 8 |
use snmptrapd
|
| 9 |
use libvirtd
|
| 10 |
}
|
| 11 |
|
| 12 |
start() {
|
| 13 |
ebegin "Starting libvirt subagent"
|
| 14 |
start-stop-daemon --start \
|
| 15 |
--env LIBVIRT_DEFAULT_URI="${LIBVIRT_DEFAULT_URI}" \
|
| 16 |
--exec /usr/bin/libvirtMib_subagent \
|
| 17 |
-- ${LIBVIRT_SNMP_OPTIONS}
|
| 18 |
eend $?
|
| 19 |
}
|
| 20 |
|
| 21 |
stop() {
|
| 22 |
ebegin "Stopping libvirt subagent"
|
| 23 |
# "--exec /usr/bin/libvirtMib_subagent" does not work and the name gets truncated
|
| 24 |
start-stop-daemon --stop \
|
| 25 |
--name libvirtMib_suba
|
| 26 |
eend $?
|
| 27 |
}
|