From 7f2c56c9fc965acddc07dd50fc06a7511b706088 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Sun, 18 Jul 2021 02:30:58 -0500 Subject: network/jabberd2: Create piddir during init Signed-off-by: Willy Sudiarto Raharjo --- network/jabberd2/jabberd2.SlackBuild | 9 +++------ network/jabberd2/rc.jabberd2 | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'network/jabberd2') diff --git a/network/jabberd2/jabberd2.SlackBuild b/network/jabberd2/jabberd2.SlackBuild index 146e89129da8..36f7224ba8cd 100644 --- a/network/jabberd2/jabberd2.SlackBuild +++ b/network/jabberd2/jabberd2.SlackBuild @@ -141,11 +141,8 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/etc/rc.d \ $PKG/var/lib/jabberd2/{db,fs,stats} \ - $PKG/var/log/jabberd2 \ - $PKG/var/run/jabberd2 -chown -R $JABBERUSR.$JABBERGRP $PKG/var/lib/jabberd2 \ - $PKG/var/log/jabberd2 \ - $PKG/var/run/jabberd2 + $PKG/var/log/jabberd2 +chown -R $JABBERUSR:$JABBERGRP $PKG/var/lib/jabberd2 $PKG/var/log/jabberd2 install -o root -g root -m 644 $CWD/rc.jabberd2 $PKG/etc/rc.d/rc.jabberd2.new sed -i -e "s/%JABBERUSR%/$JABBERUSR/g" $PKG/etc/rc.d/rc.jabberd2.new @@ -154,7 +151,7 @@ rm -r $PKG/usr/etc \ $PKG/etc/jabberd2/templates/*.dist find $PKG/etc/jabberd2 -type f -exec mv {} {}.new \; -find $PKG/etc/jabberd2 -type f -exec chown root.$JABBERGRP {} \; -exec chmod 640 {} \; +find $PKG/etc/jabberd2 -type f -exec chown root:$JABBERGRP {} \; -exec chmod 640 {} \; sed -i -e "s#var/jabberd/pid#var/run/jabberd2#g" $PKG/etc/jabberd2/c2s.xml.new sed -i -e "s#var/jabberd/log#var/log/jabberd2#g" $PKG/etc/jabberd2/c2s.xml.new sed -i -e "s#var/jabberd/stats#var/lib/jabberd2/stats#g" $PKG/etc/jabberd2/c2s.xml.new diff --git a/network/jabberd2/rc.jabberd2 b/network/jabberd2/rc.jabberd2 index ca328a6df37a..c5e8a70f5476 100644 --- a/network/jabberd2/rc.jabberd2 +++ b/network/jabberd2/rc.jabberd2 @@ -1,6 +1,8 @@ #!/bin/sh jabberd2_start() { + mkdir -p /var/run/jabberd2 + chown %JABBERUSR% /var/run/jabberd2 su - %JABBERUSR% -c '/usr/bin/jabberd &' } -- cgit v1.2.3