aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordemon <demon@FreeBSD.org>2000-11-26 04:29:43 +0800
committerdemon <demon@FreeBSD.org>2000-11-26 04:29:43 +0800
commit45a9792df7649c02c92efd7d85a558845a38c50e (patch)
tree8b47beb4f10830db06a166a2babea24bf48a3157
parentc9131b255e63326eeb2a68dcf3565222313c41c4 (diff)
downloadfreebsd-ports-gnome-45a9792df7649c02c92efd7d85a558845a38c50e.tar.gz
freebsd-ports-gnome-45a9792df7649c02c92efd7d85a558845a38c50e.tar.zst
freebsd-ports-gnome-45a9792df7649c02c92efd7d85a558845a38c50e.zip
LOCALBASE -> PREFIX where nesessary;
add 'stop' action to webmin.sh.sample. PR: 23093 Submitted by: olgeni@uli.it
-rw-r--r--sysutils/webmin/Makefile11
-rw-r--r--sysutils/webmin/files/webmin.sh.in26
-rw-r--r--sysutils/webmin/files/webmin.sh.sample26
3 files changed, 48 insertions, 15 deletions
diff --git a/sysutils/webmin/Makefile b/sysutils/webmin/Makefile
index 26d26ffbc372..d8068c706b63 100644
--- a/sysutils/webmin/Makefile
+++ b/sysutils/webmin/Makefile
@@ -29,11 +29,12 @@ post-patch:
${WRKDIR}/webmin-${PORTVERSION}/bind8/config-freebsd-3.4
do-install:
- ${MKDIR} ${LOCALBASE}/lib/webmin
- ${CP} -r ${WRKSRC}/* ${LOCALBASE}/lib/webmin
- @cd ${LOCALBASE}/lib/webmin && find . -name "*.orig" -print \
+ @${MKDIR} ${PREFIX}/lib/webmin
+ @${CP} -r ${WRKSRC}/* ${PREFIX}/lib/webmin
+ @cd ${PREFIX}/lib/webmin && find . -name "*.orig" -print \
| xargs ${RM}
- @cd ${LOCALBASE}/lib/webmin && ./setup.sh
- ${MV} /tmp/webmin.sh ${LOCALBASE}/etc/rc.d/webmin.sh
+ @cd ${PREFIX}/lib/webmin && ./setup.sh
+ @${MV} /tmp/webmin.sh ${PREFIX}/etc/rc.d/webmin.sh
+ @${CHMOD} 554 ${PREFIX}/etc/rc.d/webmin.sh
.include <bsd.port.mk>
diff --git a/sysutils/webmin/files/webmin.sh.in b/sysutils/webmin/files/webmin.sh.in
index da6052083433..a2b203907e22 100644
--- a/sysutils/webmin/files/webmin.sh.in
+++ b/sysutils/webmin/files/webmin.sh.in
@@ -2,8 +2,24 @@
# $FreeBSD$
-if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
- if [ -x !!PREFIX!!/etc/webmin/start ]; then
- !!PREFIX!!/etc/webmin/start
- fi
-fi
+case $1 in
+
+ start)
+ if [ -x !!PREFIX!!/etc/webmin/start ]; then
+ !!PREFIX!!/etc/webmin/start >/dev/null
+ echo -n ' webmin'
+ fi
+ ;;
+
+ stop)
+ if [ -x !!PREFIX!!/etc/webmin/stop ]; then
+ !!PREFIX!!/etc/webmin/stop >/dev/null
+ echo -n ' webmin'
+ fi
+ ;;
+
+ *)
+ echo "usage: `basename $0` {start|stop}" >&2
+ exit 64
+ ;;
+esac
diff --git a/sysutils/webmin/files/webmin.sh.sample b/sysutils/webmin/files/webmin.sh.sample
index da6052083433..a2b203907e22 100644
--- a/sysutils/webmin/files/webmin.sh.sample
+++ b/sysutils/webmin/files/webmin.sh.sample
@@ -2,8 +2,24 @@
# $FreeBSD$
-if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
- if [ -x !!PREFIX!!/etc/webmin/start ]; then
- !!PREFIX!!/etc/webmin/start
- fi
-fi
+case $1 in
+
+ start)
+ if [ -x !!PREFIX!!/etc/webmin/start ]; then
+ !!PREFIX!!/etc/webmin/start >/dev/null
+ echo -n ' webmin'
+ fi
+ ;;
+
+ stop)
+ if [ -x !!PREFIX!!/etc/webmin/stop ]; then
+ !!PREFIX!!/etc/webmin/stop >/dev/null
+ echo -n ' webmin'
+ fi
+ ;;
+
+ *)
+ echo "usage: `basename $0` {start|stop}" >&2
+ exit 64
+ ;;
+esac