aboutsummaryrefslogtreecommitdiff
path: root/network/asterisk/asterisk.SlackBuild
diff options
context:
space:
mode:
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