network/jabberd2: Create piddir during init
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
828a7a28d5
commit
7f2c56c9fc
|
@ -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
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
jabberd2_start() {
|
||||
mkdir -p /var/run/jabberd2
|
||||
chown %JABBERUSR% /var/run/jabberd2
|
||||
su - %JABBERUSR% -c '/usr/bin/jabberd &'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue