diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2021-07-18 02:30:58 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-07-19 16:23:32 +0700 |
commit | 7f2c56c9fc965acddc07dd50fc06a7511b706088 (patch) | |
tree | 6a85c201dffc43b0e63a51f7c71a649217a5bbdc /network/jabberd2 | |
parent | 828a7a28d55221d19ab7026663153cc88271194d (diff) |
network/jabberd2: Create piddir during init
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/jabberd2')
-rw-r--r-- | network/jabberd2/jabberd2.SlackBuild | 9 | ||||
-rw-r--r-- | network/jabberd2/rc.jabberd2 | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/network/jabberd2/jabberd2.SlackBuild b/network/jabberd2/jabberd2.SlackBuild index 146e89129da84..36f7224ba8cde 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 ca328a6df37ac..c5e8a70f5476d 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 &' } |