summaryrefslogtreecommitdiff
path: root/src/interface/virtinterfaced.init.in
blob: 4653cb1e1655170611114f52ff2779ed2d646df3 (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

description="Virtualization interface daemon"

VIRTINTERFACED_OPTS=${VIRTINTERFACED_OPTS:-"${VIRTINTERFACED_OPTS}"}
VIRTINTERFACED_TIMEOUT=${VIRTINTERFACED_TERMTIMEOUT:-"TERM/25/KILL/5"}

command="@sbindir@/virtinterfaced"
command_args="-d ${VIRTINTERFACED_OPTS}"
pidfile="@runstatedir@/virtinterfaced.pid"
retry="${VIRTINTERFACED_TERMTIMEOUT}"

extra_started_commands="reload"
description_reload="re-exec the daemon to enforce configuration reload"

depend() {
    use dbus
    after nfs nfsmount
}

reload() {
    ebegin "re-exec() virtinterfaced"

    start-stop-daemon --signal SIGHUP \
      --exec "${command}" --pidfile "${pidfile}"
}