aboutsummaryrefslogtreecommitdiff
path: root/www/tinyproxy/files/tinyproxy.in
diff options
context:
space:
mode:
Diffstat (limited to 'www/tinyproxy/files/tinyproxy.in')
-rw-r--r--www/tinyproxy/files/tinyproxy.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/www/tinyproxy/files/tinyproxy.in b/www/tinyproxy/files/tinyproxy.in
new file mode 100644
index 000000000000..7bc4ab95a0b6
--- /dev/null
+++ b/www/tinyproxy/files/tinyproxy.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: tinyproxy
+# REQUIRE: LOGIN
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable tinyproxy:
+# tinyproxy_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable tinyproxy
+# tinyproxy_config (path): Set to "%%PREFIX%%/etc/tinyproxy.conf" by default.
+
+. /etc/rc.subr
+
+name="tinyproxy"
+rcvar=tinyproxy_enable
+
+load_rc_config $name
+
+# Make sure the pidfile matches what's in the config file.
+: ${tinyproxy_enable="NO"}
+: ${tinyproxy_pidfile="/var/run/tinyproxy.pid"}
+: ${tinyproxy_config="%%PREFIX%%/etc/tinyproxy.conf"}
+
+pidfile=${tinyproxy_pidfile}
+command=%%PREFIX%%/sbin/tinyproxy
+command_args="-c $tinyproxy_config 2> /dev/null"
+
+run_rc_command "$1"