network/elemental-ircd: Create piddir during init

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Robby Workman 2021-07-16 00:24:41 -05:00 committed by Willy Sudiarto Raharjo
parent 2bd6efa3b4
commit b8a65d7cf7
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 9 additions and 5 deletions

View File

@ -90,7 +90,7 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-ipv6 \
--enable-epoll \
--with-logdir="/var/log/$PRGNAM" \
--with-rundir=/var/run
--with-rundir="/var/run/$PRGNAM"
make
make install DESTDIR=$PKG

View File

@ -3,12 +3,16 @@
# elemental-ircd startup script for Slackware
IRCD_USER="@IRCD_UNAME@"
PIDFILE="/var/run/elemental-ircd/ircd.pid"
PID=`cat $PIDFILE 2>/dev/null`
# Don't edit PIDFILE ; it's set in configure by --with-rundir
PIDFILE=/var/run/elemental-ircd/ircd.pid
PID=$(cat $PIDFILE 2>/dev/null)
ircd_start() {
echo "Starting elemental-ircd."
su - $IRCD_USER -c "/usr/bin/ircd -pidfile $PIDFILE"
mkdir -p $(dirname $PIDFILE)
chown $IRCD_USER:$IRCD_GROUP $(dirname $PIDFILE)
su - $IRCD_USER -c /usr/bin/ircd
}
ircd_stop() {
@ -23,7 +27,7 @@ ircd_reload() {
kill -HUP $PID
echo " done."
else
echo "ircd doesn't seem to be running."
echo "elemental-ircd doesn't seem to be running."
exit 1
fi
}