diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2005-05-30 20:39:23 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2005-05-30 20:39:23 +0000 |
commit | 076d41fd5fd97e5d7eea8d8342fdab735f33f3b8 (patch) | |
tree | 7a64079906398404d7217738333d1223a7182e72 /irc | |
parent | fec83947c170167ad983bad1ce0852a5e2d506f7 (diff) | |
download | ports-076d41fd5fd97e5d7eea8d8342fdab735f33f3b8.tar.gz ports-076d41fd5fd97e5d7eea8d8342fdab735f33f3b8.zip |
Notes
Diffstat (limited to 'irc')
-rw-r--r-- | irc/ircd-ru/Makefile | 12 | ||||
-rw-r--r-- | irc/ircd-ru/files/ircd.sh.in | 32 | ||||
-rw-r--r-- | irc/ircd-ru/files/ircd.sh.sample | 23 | ||||
-rw-r--r-- | irc/ircd-ru/files/pkg-message.in (renamed from irc/ircd-ru/pkg-message) | 3 | ||||
-rw-r--r-- | irc/ircd-ru/pkg-plist | 4 |
5 files changed, 37 insertions, 37 deletions
diff --git a/irc/ircd-ru/Makefile b/irc/ircd-ru/Makefile index 3a1884b14f7a..df0c14c64e26 100644 --- a/irc/ircd-ru/Makefile +++ b/irc/ircd-ru/Makefile @@ -7,7 +7,7 @@ PORTNAME= ircd-ru PORTVERSION= 1.0.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= irc russian MASTER_SITES= ftp://ftp.ircd.ru/pub/ircd-RU/ ftp://ftp.ircd.ru/pub/ircd-RU/old/ DISTNAME= ircd-RU-${PORTVERSION}-02-stable @@ -18,7 +18,8 @@ COMMENT= An irc daemon with translation schemes and other useful features USE_BZIP2= yes GNU_CONFIGURE= yes USE_REINPLACE= yes -PKGMESSAGE= ${WRKSRC}/pkg-message +SUB_FILES= pkg-message +USE_RC_SUBR= ircd.sh VARDIR= /var PLIST_SUB= VARDIR=${VARDIR} @@ -94,12 +95,7 @@ pre-install: @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: - @${INSTALL_SCRIPT} -m 555 ${FILESDIR}/ircd.sh.sample ${PREFIX}/etc/rc.d - @${CHOWN} -R ircd:ircd ${PREFIX}/etc/ircd-ru ${DATADIR} ${VARDIR}/log/ircd-ru ${VARDIR}/run/ircd-ru -.if !defined(NOPORTDOCS) - @${CHOWN} -R ircd:ircd ${DOCSDIR} -.endif - @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' pkg-message > ${PKGMESSAGE} + @${CHOWN} -R ircd:ircd ${VARDIR}/log/ircd-ru @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/irc/ircd-ru/files/ircd.sh.in b/irc/ircd-ru/files/ircd.sh.in new file mode 100644 index 000000000000..0b9baab1f854 --- /dev/null +++ b/irc/ircd-ru/files/ircd.sh.in @@ -0,0 +1,32 @@ +#! /bin/sh + +# +# PROVIDE: ircd +# +# Add the fellowing line to /etc/rc.conf to enable ircd: +# +# ircd_enable="YES" +# + +. "%%RC_SUBR%%" + +name=ircd +rcvar=`set_rcvar` + +command=/usr/local/sbin/ircd + +ircd_pidfile="/var/run/ircd-ru/ircd.pid" +ircd_required_files="/usr/local/etc/ircd-ru/ircd.conf /usr/local/etc/ircd-ru/ircd.motd /usr/local/etc/ircd-ru/ircd.smotd" +ircd_user="ircd" + +pidfile=${ircd_pidfile} +required_files=${ircd_required_files} + +ircd_precmd () { + /usr/bin/install -d -o ircd -g ircd /var/run/ircd-ru + eval `/usr/bin/limits -U ${ircd_user} -e` +} +start_precmd="ircd_precmd" + +load_rc_config ${name} +run_rc_command "$1" diff --git a/irc/ircd-ru/files/ircd.sh.sample b/irc/ircd-ru/files/ircd.sh.sample deleted file mode 100644 index 36d64efb43aa..000000000000 --- a/irc/ircd-ru/files/ircd.sh.sample +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -PREFIX=$(expr $0 : "\(/.*/\)etc/rc\.d/$(basename $0)\$") - -IRCD=${PREFIX}sbin/ircd - -case "$1" in -start) - if [ -x $IRCD ]; then - $IRCD -u ircd -g ircd >/dev/null 2>&1 - echo -n ' ircd' - fi - ;; -stop) - kill `cat /var/run/ircd-ru/ircd.pid` >/dev/null 2>&1 - echo -n ' ircd' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 diff --git a/irc/ircd-ru/pkg-message b/irc/ircd-ru/files/pkg-message.in index edfa042c48c2..d9403b67d2d0 100644 --- a/irc/ircd-ru/pkg-message +++ b/irc/ircd-ru/files/pkg-message.in @@ -10,8 +10,7 @@ You should now edit %%PREFIX%%/ircd-RU/etc/ircd.conf (cp ircd.conf-dist ircd.conf; vi ircd.conf) You may then start the server by running: - cd %%PREFIX%%/etc/rc.d/ - mv ircd.sh.sample ircd.sh + echo "ircd_enable=\"YES\"" >> /etc/rc.conf %%PREFIX%%/etc/rc.d/ircd.sh start ---------------------------------------------------- diff --git a/irc/ircd-ru/pkg-plist b/irc/ircd-ru/pkg-plist index 2029ffd2d6ab..89e1b9c55949 100644 --- a/irc/ircd-ru/pkg-plist +++ b/irc/ircd-ru/pkg-plist @@ -7,7 +7,6 @@ etc/ircd-ru/kline.conf etc/ircd-ru/ru_RU.CP1251/ircd.motd-dist etc/ircd-ru/ru_RU.CP1251/ircd.smotd-dist etc/ircd-ru/ru_RU.KOI8-R/ircd.conf-dist -etc/rc.d/ircd.sh.sample %%PORTDOCS%%%%DOCSDIR%%/README.Ilines %%PORTDOCS%%%%DOCSDIR%%/opers.txt %%PORTDOCS%%%%DOCSDIR%%/ru_RU.KOI8-R/FAQ @@ -27,8 +26,5 @@ etc/rc.d/ircd.sh.sample %%PORTDOCS%%@dirrm %%DOCSDIR%% @exec mkdir -m 755 %%VARDIR%%/log/ircd-ru @exec chown ircd:ircd %%VARDIR%%/log/ircd-ru -@exec mkdir -m 755 %%VARDIR%%/run/ircd-ru -@exec chown ircd:ircd %%VARDIR%%/run/ircd-ru -@unexec rm -R %%VARDIR%%/run/ircd-ru 2>&1 >/dev/null || true @unexec rm -R %%VARDIR%%/log/ircd-ru 2>&1 >/dev/null || true @unexec (rmdir %D/etc/ircd-ru && pw user del ircd) || echo 'To completely remove this port delete user ircd, group ircd and remove etc/ircd-ru' |