diff options
Diffstat (limited to 'chat/bitlbee')
-rw-r--r-- | chat/bitlbee/Makefile | 16 | ||||
-rwxr-xr-x | chat/bitlbee/files/bitlbee.sh | 14 |
2 files changed, 23 insertions, 7 deletions
diff --git a/chat/bitlbee/Makefile b/chat/bitlbee/Makefile index 7b0fb179d3a..49ff2224122 100644 --- a/chat/bitlbee/Makefile +++ b/chat/bitlbee/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.75 2018/05/18 17:54:05 leot Exp $ +# $NetBSD: Makefile,v 1.76 2018/05/23 18:44:52 leot Exp $ DISTNAME= bitlbee-3.5.1 PKGREVISION= 1 @@ -33,18 +33,22 @@ CONF_FILES= ${DATADIR}/motd.txt ${PKG_SYSCONFDIR}/motd.txt CONF_FILES+= ${EGDIR}/bitlbee.conf ${PKG_SYSCONFDIR}/bitlbee.conf OWN_DIRS+= ${VARBASE}/run/bitlbee -BUILD_DEFS+= VARBASE +BUILD_DEFS+= VARBASE BITLBEE_USER BITLBEE_GROUP +FILES_SUBST+= BITLBEE_USER=${BITLBEE_USER} BITLBEE_GROUP=${BITLBEE_GROUP} EGDIR= ${PREFIX}/share/examples/bitlbee DATADIR= ${PREFIX}/share/bitlbee DOCDIR= ${PREFIX}/share/doc/bitlbee STATEDIR= ${VARBASE}/db/bitlbee -OWN_DIRS_PERMS= ${STATEDIR} bitlbee nobody 700 -OWN_DIRS_PERMS+= ${VARBASE}/run/bitlbee bitlbee nobody 700 +BITLBEE_USER?= bitlbee +BITLBEE_GROUP?= nobody -PKG_GROUPS= nobody -PKG_USERS= bitlbee:nobody +OWN_DIRS_PERMS= ${STATEDIR} ${BITLBEE_USER} ${BITLBEE_GROUP} 700 +OWN_DIRS_PERMS+= ${VARBASE}/run/bitlbee ${BITLBEE_USER} ${BITLBEE_GROUP} 700 + +PKG_GROUPS= ${BITLBEE_GROUP} +PKG_USERS= ${BITLBEE_USER}:${BITLBEE_GROUP} PKG_HOME.bitlbee= ${VARBASE}/db/bitlbee INSTALLATION_DIRS= ${PKGMANDIR}/man5 ${PKGMANDIR}/man8 sbin diff --git a/chat/bitlbee/files/bitlbee.sh b/chat/bitlbee/files/bitlbee.sh index 5c72cac63bb..e7908d1cb7f 100755 --- a/chat/bitlbee/files/bitlbee.sh +++ b/chat/bitlbee/files/bitlbee.sh @@ -3,13 +3,25 @@ # PROVIDE: bitlbee # REQUIRE: DAEMON -. /etc/rc.subr +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi name="bitlbee" rcvar=$name command="@PREFIX@/sbin/bitlbee" pidfile="@VARBASE@/run/${name}/pid" command_args="-D" # run as a daemon +start_precmd="bitlbee_precmd" + +bitlbee_precmd() +{ + if [ ! -d "@VARBASE@/run/${name}" ]; then + @MKDIR@ "@VARBASE@/run/${name}" + @CHMOD@ 0700 "@VARBASE@/run/${name}" + @CHOWN@ @BITLBEE_USER@:@BITLBEE_GROUP@ "@VARBASE@/run/${name}" + fi +} if [ -f /etc/rc.subr ]; then load_rc_config $name |