aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2007-08-30 23:02:47 +0800
committersem <sem@FreeBSD.org>2007-08-30 23:02:47 +0800
commitb476f8a58f9036fbd2658d3af7b891e0364f5f3e (patch)
tree89345d212719144bdd1dfdf2da8c401b4b63e24b /security
parentb4b6730d548fdfd5ddfeb3460f615cbb81781c94 (diff)
downloadfreebsd-ports-gnome-b476f8a58f9036fbd2658d3af7b891e0364f5f3e.tar.gz
freebsd-ports-gnome-b476f8a58f9036fbd2658d3af7b891e0364f5f3e.tar.zst
freebsd-ports-gnome-b476f8a58f9036fbd2658d3af7b891e0364f5f3e.zip
- Modern rc.d script
PR: ports/115198 Submitted by: Jan Srzednicki <w@wrzask.pl> Approved by: maintainer
Diffstat (limited to 'security')
-rw-r--r--security/drweb/Makefile5
-rw-r--r--security/drweb/files/drwebd.sh.in24
-rw-r--r--security/drweb/pkg-plist3
3 files changed, 27 insertions, 5 deletions
diff --git a/security/drweb/Makefile b/security/drweb/Makefile
index 8296e2a0e77a..655c7d4b5ecf 100644
--- a/security/drweb/Makefile
+++ b/security/drweb/Makefile
@@ -7,7 +7,7 @@
PORTNAME= drweb
PORTVERSION= 4.33
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= ftp://ftp.drweb.com/pub/drweb/unix/FreeBSD/61/:f61 \
ftp://ftp.drweb.com/pub/drweb/unix/FreeBSD/55/:f55 \
@@ -22,6 +22,7 @@ RUN_DEPENDS= ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget
IA32_BINARY_PORT= yes
NO_BUILD= yes
+USE_RC_SUBR= drwebd.sh
.include <bsd.port.pre.mk>
@@ -70,8 +71,6 @@ do-install:
${CP} ${PREFIX}/etc/drweb/email.ini-distr \
${PREFIX}/etc/drweb/email.ini; \
fi
- @${INSTALL_SCRIPT} -m 0750 -b ${WRKSRC}${LOCALBASE}/etc/rc.d/00.drwebd.sh \
- ${PREFIX}/etc/rc.d/001.drwebd.sh
post-install:
.if !defined(NOPORTDOCS)
diff --git a/security/drweb/files/drwebd.sh.in b/security/drweb/files/drwebd.sh.in
new file mode 100644
index 000000000000..3d2bc922e3e0
--- /dev/null
+++ b/security/drweb/files/drwebd.sh.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+# PROVIDE: drwebd
+# REQUIRE: DAEMON
+# BEFORE: mail
+
+. %%RC_SUBR%%
+
+name="drwebd"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+: ${drwebd_enable="NO"}
+: ${drwebd_pidfile="/var/drweb/run/drwebd.pid"}
+: ${drwebd_procname="%%PREFIX%%/drweb/drwebd"}
+
+command=$drwebd_procname
+pidfile=$drwebd_pidfile
+
+run_rc_command "$1"
+
diff --git a/security/drweb/pkg-plist b/security/drweb/pkg-plist
index 170cf3001aaf..6dfffc7f24f9 100644
--- a/security/drweb/pkg-plist
+++ b/security/drweb/pkg-plist
@@ -1,4 +1,4 @@
-@unexec if [ -f /var/drweb/run/drwebd.pid ] ; then %D/etc/rc.d/001.drwebd.sh stop ; fi
+@unexec if [ -f /var/drweb/run/drwebd.pid ] ; then %D/etc/rc.d/drwebd stop ; fi
drweb/drweb
drweb/drwebd
drweb/drwebdc
@@ -15,7 +15,6 @@ etc/drweb/drweb32.ini-distr
@unexec if [ -f %D/etc/drweb/email.ini ] && cmp -s %D/etc/drweb/email.ini %D/etc/drweb/email.ini-distr; then rm -f %D/etc/drweb/email.ini ; fi
etc/drweb/email.ini-distr
@exec if [ ! -f %B/email.ini ] ; then cp -p %B/%F %B/email.ini ; fi
-etc/rc.d/001.drwebd.sh
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog.rus
%%PORTDOCS%%%%DOCSDIR%%/FAQ