aboutsummaryrefslogtreecommitdiff
path: root/www/webredirect
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-03-29 12:22:15 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-03-29 12:22:15 +0000
commita63b14f1556500aae30e6ef3fb1d5d712ba48d62 (patch)
treefd6557f402f5adb31f7387c2af93fbd01ab2a254 /www/webredirect
parent9fe982973fdc2bc7f5f011fa79cbe24fa8c37fa6 (diff)
downloadports-a63b14f1556500aae30e6ef3fb1d5d712ba48d62.tar.gz
ports-a63b14f1556500aae30e6ef3fb1d5d712ba48d62.zip
Notes
Diffstat (limited to 'www/webredirect')
-rw-r--r--www/webredirect/Makefile9
-rw-r--r--www/webredirect/files/webredirect.sh.in26
-rw-r--r--www/webredirect/pkg-message4
3 files changed, 29 insertions, 10 deletions
diff --git a/www/webredirect/Makefile b/www/webredirect/Makefile
index a47613252f07..1c265c215705 100644
--- a/www/webredirect/Makefile
+++ b/www/webredirect/Makefile
@@ -7,6 +7,7 @@
PORTNAME= webredirect
PORTVERSION= 0.3
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= ftp://ftp.stacken.kth.se/pub/projects/webredirect/
@@ -17,8 +18,7 @@ ALL_TARGET= depend all
MAN1= webredirect.1
PLIST_FILES= bin/webredirect
-
-.include <bsd.port.pre.mk>
+USE_RC_SUBR= webredirect.sh
pre-build:
@${TOUCH} ${WRKSRC}/incu/depend.mk
@@ -28,7 +28,4 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/webredirect ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/webredirect.1 ${PREFIX}/man/man1
-post-install:
- @${SETENV} ${MAKE_ENV} ${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/www/webredirect/files/webredirect.sh.in b/www/webredirect/files/webredirect.sh.in
new file mode 100644
index 000000000000..2ad261f91b92
--- /dev/null
+++ b/www/webredirect/files/webredirect.sh.in
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# PROVIDE: webredirect
+# REQUIRE: DAEMON
+
+#
+# Add the following lines to /etc/rc.conf to enable webredirect:
+#
+# webredirect_enable="YES" # YES or NO (default)
+# webredirect_flags="" # webredirect command line flags
+#
+
+. %%RC_SUBR%%
+
+name="webredirect"
+rcvar=`set_rcvar`
+command_args="&"
+
+load_rc_config $name
+
+: ${webredirect_enable="NO"}
+: ${webredirect_flags="-t http://www.freebsd.org -n"}
+
+command="%%PREFIX%%/bin/${name}"
+
+run_rc_command "$1"
diff --git a/www/webredirect/pkg-message b/www/webredirect/pkg-message
deleted file mode 100644
index 7cfd7b2bd771..000000000000
--- a/www/webredirect/pkg-message
+++ /dev/null
@@ -1,4 +0,0 @@
-Webredirect is installed but does not start automatically. Read the manpage
-to find out what options you like. Then start webredirect manually. If you
-want webredirect to start automatically on boot, create a small script in
-${PREFIX}/etc/rc.d to do so.