mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
network/elemental-ircd: Create piddir during init
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
2bd6efa3b4
commit
b8a65d7cf7
2 changed files with 9 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue