network/murmur: Create piddir during init
Signed-off-by: Robby Workman <rworkman@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
1c76d01f2d
commit
08be912ab0
|
@ -114,7 +114,7 @@ mkdir -p \
|
|||
$PKG/etc/{logrotate.d,rc.d} \
|
||||
$PKG/usr/bin \
|
||||
$PKG/usr/man/man1 \
|
||||
$PKG/var/{lib,log,run}/$PRGNAM
|
||||
$PKG/var/{lib,log}/$PRGNAM
|
||||
|
||||
|
||||
install -m 644 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
|
||||
|
@ -128,20 +128,21 @@ sed \
|
|||
-e "s,uname=.*,uname=$MURMUR_USER," \
|
||||
scripts/murmur.ini.system > $PKG/etc/$PRGNAM.ini.new
|
||||
|
||||
sed \
|
||||
-i "s,PIDFILE=.*,PIDFILE=/var/run/$PRGNAM/$PRGNAM.pid," \
|
||||
$PKG/etc/rc.d/rc.$PRGNAM.new
|
||||
|
||||
sed \
|
||||
-e "s,@LOGFILE@,/var/log/$PRGNAM/$PRGNAM.log," \
|
||||
-e "s,@USER@,$MURMUR_USER,g" \
|
||||
-e "s,@GROUP@,$MURMUR_GROUP,g" \
|
||||
$CWD/$PRGNAM.logrotate > $PKG/etc/logrotate.d/$PRGNAM.new
|
||||
|
||||
sed \
|
||||
-e "s,@USER@,$MURMUR_USER,g" \
|
||||
-e "s,@GROUP@,$MURMUR_GROUP,g" \
|
||||
$CWD/rc.murmur > $PKG/etc/logrotate.d/rc.murmur.new
|
||||
|
||||
chown root:$MURMUR_GROUP $PKG/etc/$PRGNAM.ini.new
|
||||
chmod o-rwx $PKG/etc/murmur.ini.new
|
||||
|
||||
chown $MURMUR_USER:$MURMUR_GROUP $PKG/var/{lib,log,run}/$PRGNAM
|
||||
chown $MURMUR_USER:$MURMUR_GROUP $PKG/var/{lib,log}/$PRGNAM
|
||||
chmod o-rwx $PKG/var/lib/$PRGNAM
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
PIDFILE=""
|
||||
PIDFILE=/var/run/murmur/murmur.pid
|
||||
|
||||
murmur_start() {
|
||||
echo -n "Starting Murmur Server: "
|
||||
mkdir -p $(dirname $PIDFILE)
|
||||
chown @USER@:@GROUP@ $(dirname $PIDFILE)
|
||||
|
||||
if [ ! -f $PIDFILE ]; then
|
||||
/usr/bin/murmurd -ini /etc/murmur.ini & > /dev/null 2>&1
|
||||
echo "OK"
|
||||
|
|
Loading…
Reference in New Issue