mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
- rcNG'ify the port.
PR: ports/81624 Submitted by: Denis Shaposhnikov <dsh@vlink.ru>
This commit is contained in:
parent
fec83947c1
commit
076d41fd5f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=136458
@ -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>
|
||||
|
32
irc/ircd-ru/files/ircd.sh.in
Normal file
32
irc/ircd-ru/files/ircd.sh.in
Normal file
@ -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"
|
@ -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
|
@ -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
|
||||
|
||||
----------------------------------------------------
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user