aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-03-29 20:22:15 +0800
committerpav <pav@FreeBSD.org>2006-03-29 20:22:15 +0800
commit0913b86d80c26119220747fa2b7811407d61f37c (patch)
tree4454bc7ead63c16af97fb138b93110cab988fb13
parent419b33cb83fb69d7cc15bf46abed5d01161c82ad (diff)
downloadfreebsd-ports-gnome-0913b86d80c26119220747fa2b7811407d61f37c.tar.gz
freebsd-ports-gnome-0913b86d80c26119220747fa2b7811407d61f37c.tar.zst
freebsd-ports-gnome-0913b86d80c26119220747fa2b7811407d61f37c.zip
- Add rc script
- Remove obvious pkg-message PR: ports/92519 Submitted by: Andrew Pantyukhin <infofarmer@gmail.com> Approved by: maintainer timeout (2 months)
-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.