aboutsummaryrefslogtreecommitdiff
path: root/network/asterisk/asterisk.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2021-07-15 23:50:08 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-07-17 09:50:24 +0700
commit7c8ad5caee40ade1fcecdc454eb1f336466cca5a (patch)
tree3eec25a3bd4289210499680cca4334402bc6e384 /network/asterisk/asterisk.SlackBuild
parentb42e55f08c54615182b4bab08e36b8109811f968 (diff)
network/asterisk: create piddir during init
This imports the contrib/init.d/rc.slackware.asterisk from the upstream asterisk repo (with a change that we had been doing afterward) Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/asterisk/asterisk.SlackBuild')
-rw-r--r--network/asterisk/asterisk.SlackBuild9
1 files changed, 4 insertions, 5 deletions
diff --git a/network/asterisk/asterisk.SlackBuild b/network/asterisk/asterisk.SlackBuild
index 9c16bb74c9a8b..bc919d7efb672 100644
--- a/network/asterisk/asterisk.SlackBuild
+++ b/network/asterisk/asterisk.SlackBuild
@@ -244,17 +244,16 @@ for i in \
done
mkdir -p $PKG/etc/rc.d
-install -m 0755 contrib/init.d/rc.slackware.asterisk $PKG/etc/rc.d/rc.asterisk.new
-
-# Fix pid file location in rc script
-sed -i 's/asterisk.pid/asterisk\/asterisk.pid/' $PKG/etc/rc.d/rc.asterisk.new
+sed $CWD/rc.asterisk.new \
+ -e "s,@ASTERISKUSR@,$ASTERISKUSR,g" \
+ -e "s,@ASTERISKGRP@,$ASTERISKGRP,g" \
+ > $PKG/etc/rc.d/rc.asterisk.new
# Set file ownership
chown -R $ASTERISKUSR:$ASTERISKGRP $PKG/usr/lib${LIBDIRSUFFIX}
chown -R $ASTERISKUSR:$ASTERISKGRP $PKG/var/lib/asterisk
chown -R $ASTERISKUSR:$ASTERISKGRP $PKG/var/spool/asterisk
chown -R $ASTERISKUSR:$ASTERISKGRP $PKG/var/log/asterisk
-chown -R $ASTERISKUSR:$ASTERISKGRP $PKG/var/run/asterisk
chown $ASTERISKUSR:$ASTERISKGRP $PKG/usr/sbin/asterisk
# The voicemail config file needs to writeable by the asterisk user