summaryrefslogtreecommitdiff
blob: 27b877991ae291c15358119274ce4b3c19c6f2e4 (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
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
    need snmpd
    use snmptrapd
    use libvirtd
}

start() {
    ebegin "Starting libvirt subagent"
    start-stop-daemon --start \
        --env LIBVIRT_DEFAULT_URI="${LIBVIRT_DEFAULT_URI}" \
        --exec /usr/bin/libvirtMib_subagent \
        -- ${LIBVIRT_SNMP_OPTIONS}
    eend $?
}

stop() {
    ebegin "Stopping libvirt subagent"
    # "--exec /usr/bin/libvirtMib_subagent" does not work and the name gets truncated
    start-stop-daemon --stop \
        --name libvirtMib_suba
    eend $?
}