aboutsummaryrefslogtreecommitdiff
path: root/net/opentracker/files
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2019-12-09 19:07:42 +0000
committerChris Rees <crees@FreeBSD.org>2019-12-09 19:07:42 +0000
commit2caa69a9e5c76a9a09d136aeb9dee4517b2da52d (patch)
tree6788b34917e6ade821c360c2e80e76bd4e8df4aa /net/opentracker/files
parentf300596439ede56aab227a0cafb8af670a397231 (diff)
downloadports-2caa69a9e5c76a9a09d136aeb9dee4517b2da52d.tar.gz
ports-2caa69a9e5c76a9a09d136aeb9dee4517b2da52d.zip
Notes
Diffstat (limited to 'net/opentracker/files')
-rw-r--r--net/opentracker/files/opentracker-ipv6.in33
-rw-r--r--net/opentracker/files/opentracker.in24
2 files changed, 47 insertions, 10 deletions
diff --git a/net/opentracker/files/opentracker-ipv6.in b/net/opentracker/files/opentracker-ipv6.in
new file mode 100644
index 000000000000..0daea2686734
--- /dev/null
+++ b/net/opentracker/files/opentracker-ipv6.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: opentracker_ipv6
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to
+# enable opentracker:
+# opentracker_ipv6_enable (bool): Set to "NO" by default.
+# opentracker_ipv6_config (path): Set to
+# "%%PREFIX%%/etc/opentracker/opentracker-ipv6.conf"
+# by default
+
+. /etc/rc.subr
+
+name=opentracker_ipv6
+rcvar=opentracker_ipv6_enable
+desc="Lightweight Bittorrent tracker"
+
+load_rc_config $name
+
+: ${opentracker_ipv6_enable:=NO}
+: ${opentracker_ipv6_config:="%%PREFIX%%/etc/opentracker/opentracker-ipv6.conf"}
+
+command=/usr/sbin/daemon
+pidfile=/var/run/opentracker-ipv6.pid
+command_args="-p $pidfile %%PREFIX%%/bin/opentracker-ipv6 -f ${opentracker_ipv6_config}"
+procname="%%PREFIX%%/bin/opentracker-ipv6"
+required_files=${opentracker_ipv6_config}
+
+run_rc_command $1
diff --git a/net/opentracker/files/opentracker.in b/net/opentracker/files/opentracker.in
index dd3381f1af8d..3ddf9e7972ce 100644
--- a/net/opentracker/files/opentracker.in
+++ b/net/opentracker/files/opentracker.in
@@ -1,29 +1,33 @@
#!/bin/sh
-
+#
+# $FreeBSD$
+#
# PROVIDE: opentracker
# REQUIRE: LOGIN
+# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to
# enable opentracker:
# opentracker_enable (bool): Set to "NO" by default.
# opentracker_config (path): Set to
-# "%%PREFIX%%/etc/opentracker/opentracker.conf"
-# by default
+# "%%PREFIX%%/etc/opentracker/opentracker.conf"
+# by default
. /etc/rc.subr
-name="opentracker"
+name=opentracker
rcvar=opentracker_enable
+desc="Lightweight Bittorrent tracker"
load_rc_config $name
-: ${opentracker_enable="NO"}
-: ${opentracker_config="%%PREFIX%%/etc/opentracker/opentracker.conf"}
+: ${opentracker_enable:=NO}
+: ${opentracker_config:="%%PREFIX%%/etc/opentracker/opentracker-ipv6.conf"}
-command="/usr/sbin/daemon"
-command_args="-p /var/run/opentracker.pid %%PREFIX%%/bin/opentracker -f ${opentracker_config}"
+command=/usr/sbin/daemon
+pidfile=/var/run/opentracker.pid
+command_args="-p $pidfile %%PREFIX%%/bin/opentracker -f ${opentracker_config}"
procname="%%PREFIX%%/bin/opentracker"
-pidfile="/var/run/opentracker.pid"
required_files=${opentracker_config}
-run_rc_command "$1"
+run_rc_command $1