Add rc script, from Vadim Zhukov with some tweaks.

This commit is contained in:
ajacoutot 2011-05-11 09:01:26 +00:00
parent 2d702b0153
commit 1beeb02eb3
4 changed files with 22 additions and 12 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.16 2010/11/19 22:31:33 espie Exp $
# $OpenBSD: Makefile,v 1.17 2011/05/11 09:01:26 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT= H.323 gatekeeper
DISTNAME= gnugk-2.3.2
REVISION= 0
CATEGORIES= net telephony
@ -27,7 +28,7 @@ LIB_DEPENDS= net/h323plus \
databases/sqlite3
USE_GMAKE= Yes
USE_GROFF = Yes
USE_GROFF= Yes
ALL_TARGET= optshared addpasswd
NO_REGRESS= Yes

View File

@ -1,9 +0,0 @@
To start gnugk on boot-up, add the following lines to /etc/rc.local:
if [ -x ${PREFIX}/bin/gnugk ]; then
install -d -o _gnugk /var/run/gnugk
echo -n ' gnugk'
${PREFIX}/bin/gnugk -t -c ${SYSCONFDIR}/gatekeeper.ini \
-u _gnugk -o /var/log/gnugk/gnugk.log \
--pid /var/run/gnugk/gnugk.pid 1> /dev/null &
fi

View File

@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.7 2010/03/23 21:14:45 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.8 2011/05/11 09:01:26 ajacoutot Exp $
@newgroup _gnugk:586
@newuser _gnugk:586:586:daemon:Gatekeeper Daemon:/var/empty:/sbin/nologin
@extraunexec rm -rf /var/log/gnugk/*
@bin bin/addpasswd
@bin bin/gnugk
@man man/man1/gnugk.1
@ -41,5 +42,6 @@ share/examples/gnugk/status.ini
share/examples/gnugk/syslog.ini
share/examples/gnugk/uri.ini
share/examples/gnugk/vqueue.ini
@rcscript ${RCDIR}/gnugk
@owner _gnugk
@sample /var/log/gnugk/

16
net/gnugk/pkg/gnugk.rc Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
#
# $OpenBSD: gnugk.rc,v 1.1 2011/05/11 09:01:26 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/gnugk"
daemon_flags="-t -c ${SYSCONFDIR}/gatekeeper.ini -u _gnugk -o /var/log/gnugk/gnugk.log"
. /etc/rc.d/rc.subr
rc_bg=YES
rc_reload() {
echo reload | nc 127.0.0.1 7000
}
rc_cmd $1