diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2004-04-19 16:57:56 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2004-04-19 16:57:56 +0000 |
commit | 1bf8f045bb4276e94a849d1f311da79513eb9239 (patch) | |
tree | ed331aa26ad99135256462ef8aec167624e82469 /irc/dancer-services | |
parent | 12c05f36a2218bd8340c412dbe3d03a7ea091cb8 (diff) |
Notes
Diffstat (limited to 'irc/dancer-services')
-rw-r--r-- | irc/dancer-services/Makefile | 10 | ||||
-rw-r--r-- | irc/dancer-services/files/dancer-services.sh | 36 | ||||
-rw-r--r-- | irc/dancer-services/pkg-message | 3 |
3 files changed, 27 insertions, 22 deletions
diff --git a/irc/dancer-services/Makefile b/irc/dancer-services/Makefile index 6540636216b7..547a513d5d6f 100644 --- a/irc/dancer-services/Makefile +++ b/irc/dancer-services/Makefile @@ -7,7 +7,7 @@ PORTNAME= dancer-services PORTVERSION= 1.8.0.6.9 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= irc MASTER_SITES= http://source.freenode.net/~asuffield/dancer/%SUBDIR%/ MASTER_SITE_SUBDIR= ${PORTNAME} @@ -18,6 +18,8 @@ COMMENT= The IRC services (nickserv, chanserv, etc.) for dancer-ircd BUILD_DEPENDS+= ${LOCALBASE}/bin/autoconf:${PORTSDIR}/devel/autoconf \ ${LOCALBASE}/bin/automake:${PORTSDIR}/devel/automake +USE_RC_SUBR= yes + USE_REINPLACE= yes USE_GMAKE= yes GNU_CONFIGURE= yes @@ -42,6 +44,10 @@ pre-configure: pre-build: cd ${WRKSRC}; ${MAKE} depend +post-build: + ${SED} -e 's,%%PREFIX%%,${PREFIX},g' -e 's,%%RC_SUBR%%,${RC_SUBR},g' \ + ${FILESDIR}/dancer-services.sh > ${WRKDIR}/dancer-services.sh + pre-install: ${MKDIR} ${PREFIX}/share/dancer-services @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL @@ -68,8 +74,6 @@ post-install: ${FIND} ${PREFIX}/etc/dancer-services -type f -print0 | \ ${XARGS} -0 ${CHMOD} 600 ${CHOWN} -R ircservices:ircservices ${PREFIX}/etc/dancer-services - ${SED} -e "s,%PREFIX%,${PREFIX},g" ${FILESDIR}/dancer-services.sh \ - > ${WRKDIR}/dancer-services.sh ${INSTALL_SCRIPT} ${WRKDIR}/dancer-services.sh ${PREFIX}/etc/rc.d/ ${SED} -e "s,/usr/local/,${PREFIX}/,g" ${PKGMESSAGE} .if !defined(NOPORTDOCS) diff --git a/irc/dancer-services/files/dancer-services.sh b/irc/dancer-services/files/dancer-services.sh index 0898a5066d77..c776dc03655f 100644 --- a/irc/dancer-services/files/dancer-services.sh +++ b/irc/dancer-services/files/dancer-services.sh @@ -1,25 +1,23 @@ #!/bin/sh # # $FreeBSD$ +# + +# PROVIDE: dancer-services +# KEYWORD: FreeBSD + +. %%RC_SUBR%% + +name=dancer_services +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/dancer-services +pidfile=/var/run/dancer-services/dancer-services.pid +required_files=%%PREFIX%%/etc/dancer-services/services.conf -case "$1" in -start) - if [ -x %PREFIX%/sbin/dancer-services ]; then - su -fm ircservices -c %PREFIX%/sbin/dancer-services && echo ' dancer-services' - fi - ;; +[ -z "$dancer_services_enable" ] && dancer_services_enable=NO +[ -z "$dancer_services_user" ] && dancer_services_user=ircservices -stop) - if [ -f /var/run/dancer-services.pid ]; then - kill `cat /var/run/dancer-services.pid` - else - # oh well - killall dancer-services - fi - ;; +load_rc_config $name -*) - echo "usage: $0 {start|stop}" >&2 - exit 64 - ;; -esac +run_rc_command "$1" diff --git a/irc/dancer-services/pkg-message b/irc/dancer-services/pkg-message index c52f34024aa0..a50e29effecd 100644 --- a/irc/dancer-services/pkg-message +++ b/irc/dancer-services/pkg-message @@ -16,3 +16,6 @@ You may then start the servers by running: /usr/local/etc/rc.d/dancer-ircd.sh start /usr/local/etc/rc.d/dancer-services.sh start + +To make dancer-serives automatically run on (the next) startup, you +must add ``dancer_services_enable=YES'' to /etc/rc.conf. |