| 1 | #!/sbin/openrc-run |
| 2 | # Copyright 1999-2020 Gentoo Authors |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | |
| 5 | description="libvirt virtual machine lock manager" |
| 6 | command="/usr/sbin/virtlockd" |
| 7 | start_stop_daemon_args="-b" |
| 8 | pidfile="/run/virtlockd.pid" |
| 9 | |
| 10 | extra_started_commands="reload" |
| 11 | description_reload="re-exec the daemon, while maintaining locks and clients" |
| 12 | |
| 13 | |
| 14 | depend() { |
| 15 | after ntp-client ntpd nfs nfsmount corosync |
| 16 | } |
| 17 | |
| 18 | reload() { |
| 19 | ebegin "re-exec() virtlockd" |
| 20 | |
| 21 | start-stop-daemon --signal SIGUSR1 \ |
| 22 | --exec "${command}" --pidfile "${pidfile}" |
| 23 | } |
| 24 | |