aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/etc/rc.d/vmctl.freebsd_hypervisor
diff options
context:
space:
mode:
Diffstat (limited to 'files/usr/local/etc/rc.d/vmctl.freebsd_hypervisor')
-rw-r--r--files/usr/local/etc/rc.d/vmctl.freebsd_hypervisor24
1 files changed, 24 insertions, 0 deletions
diff --git a/files/usr/local/etc/rc.d/vmctl.freebsd_hypervisor b/files/usr/local/etc/rc.d/vmctl.freebsd_hypervisor
new file mode 100644
index 0000000..5f1a84b
--- /dev/null
+++ b/files/usr/local/etc/rc.d/vmctl.freebsd_hypervisor
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+# PROVIDE: vmctl
+# REQUIRE: NETWORKING SERVERS dmesg
+# BEFORE: ipfw pf
+# KEYWORD: shutdown nojail
+
+. /etc/rc.subr
+
+name="vmctl"
+desc="Start and stop bhyve virtual machines"
+rcvar="vmctl_enable"
+
+: ${vmctl_enable:="NO"}
+
+command="/usr/local/sbin/${name}"
+start_cmd="${command} _start-all"
+stop_cmd="${command} _stop-all"
+status_cmd="${command} list"
+
+load_rc_config $name
+run_rc_command "$1"