aboutsummaryrefslogtreecommitdiffstats
path: root/roles/rc/templates/rc_freebsd.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/rc/templates/rc_freebsd.j2')
-rw-r--r--roles/rc/templates/rc_freebsd.j221
1 files changed, 15 insertions, 6 deletions
diff --git a/roles/rc/templates/rc_freebsd.j2 b/roles/rc/templates/rc_freebsd.j2
index 30f1c0a..0c4f86f 100644
--- a/roles/rc/templates/rc_freebsd.j2
+++ b/roles/rc/templates/rc_freebsd.j2
@@ -1,11 +1,20 @@
-#!/bin/ksh
+#!/bin/sh
#
# managed by Ansible
-daemon="{{ rc_cmd }}"
-daemon_flags="{{ rc_args }}"
-daemon_user="{{ rc_user }}"
+# PROVIDE: wireguard
-. /etc/rc.d/rc.subr
+. /etc/rc.subr
-rc_cmd $1
+name="{{ rc_name | lower }}"
+rcvar="${name}_enable"
+
+start_cmd="{{ rc_cmd }} {{ rc_args }}"
+
+{{ rc_name | lower }}_start()
+{
+ echo "Staring ${name} ..."
+ $(start_cmd)
+}
+
+load_rc_config $name
remember that computers suck.