aboutsummaryrefslogtreecommitdiff
path: root/security/courier-authlib-base/files/courier-authdaemond.sh
diff options
context:
space:
mode:
Diffstat (limited to 'security/courier-authlib-base/files/courier-authdaemond.sh')
-rw-r--r--security/courier-authlib-base/files/courier-authdaemond.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/security/courier-authlib-base/files/courier-authdaemond.sh b/security/courier-authlib-base/files/courier-authdaemond.sh
new file mode 100644
index 000000000000..b4af4c0b40fd
--- /dev/null
+++ b/security/courier-authlib-base/files/courier-authdaemond.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# An rc.subr-style startup script for courier-authdaemond service.
+
+# PROVIDE: courier_authdaemond
+# REQUIRE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+# Define these courier_authdaemond_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/courier_authdaemond
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+
+courier_authdaemond_enable=${courier_authdaemond_enable-"NO"}
+
+. %%RC_SUBR%%
+
+name="courier_authdaemond"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/authdaemond"
+
+start_cmd="authdaemond_cmd start"
+stop_cmd="authdaemond_cmd stop"
+restart_cmd="authdaemond_cmd stop && authdaemond_cmd start"
+
+load_rc_config $name
+
+authdaemond_cmd () {
+ case $1 in
+ start)
+ echo "Starting ${name}."
+ ${command} start
+ ;;
+ stop)
+ echo "Stopping ${name}."
+ ${command} stop
+ ;;
+ esac
+}
+
+run_rc_command "$1"
+