aboutsummaryrefslogtreecommitdiff
path: root/network/murmur
diff options
context:
space:
mode:
authorRuben Schuller <sb@rbn.im>2021-07-16 22:28:57 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-07-19 16:23:32 +0700
commit08be912ab0052acfd041725c341f37b91a5840c7 (patch)
tree95038d268a70d5a169fa75e2ededb27d4cd361c4 /network/murmur
parent1c76d01f2d644c1c104475a970ec512dd33f849c (diff)
network/murmur: Create piddir during init
Signed-off-by: Robby Workman <rworkman@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/murmur')
-rw-r--r--network/murmur/murmur.SlackBuild13
-rw-r--r--network/murmur/rc.murmur5
2 files changed, 11 insertions, 7 deletions
diff --git a/network/murmur/murmur.SlackBuild b/network/murmur/murmur.SlackBuild
index 62cbd3dbf7be..1227ac57c941 100644
--- a/network/murmur/murmur.SlackBuild
+++ b/network/murmur/murmur.SlackBuild
@@ -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
@@ -129,19 +129,20 @@ sed \
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 \
diff --git a/network/murmur/rc.murmur b/network/murmur/rc.murmur
index 90d3c99a40d6..e14567938bec 100644
--- a/network/murmur/rc.murmur
+++ b/network/murmur/rc.murmur
@@ -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"