summaryrefslogtreecommitdiff
path: root/contrib/scripts
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2014-06-12 07:52:59 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2014-06-12 07:52:59 +0000
commit3b0ad74e1741c78afbab229cb38965280744f76d (patch)
tree761768adedb7f595146bba5d223b4e5905ece1dd /contrib/scripts
parent71b3c9a749b9eb910ea6e5353d3703f93709cb29 (diff)
safe_asterisk: Overwrite old safe_asterisk on make install.
From now on, make install will overwrite safe_asterisk with the latest version. You need to move any local modifications to files inside /etc/asterisk/startup.d, if you have any. See also commits r394939 and r397938. ASTERISK-21965 #close Patches: safe_asterisk.patch uploaded by jkister (License 6232, modified by me) ........ Merged revisions 415748 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib/scripts')
-rw-r--r--contrib/scripts/safe_asterisk9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk
index 8901d8a83..de24d1b28 100644
--- a/contrib/scripts/safe_asterisk
+++ b/contrib/scripts/safe_asterisk
@@ -1,5 +1,6 @@
#!/bin/sh
+ASTETCDIR="__ASTERISK_ETC_DIR__"
ASTSBINDIR="__ASTERISK_SBIN_DIR__"
ASTVARRUNDIR="__ASTERISK_VARRUN_DIR__"
ASTVARLOGDIR="__ASTERISK_LOG_DIR__"
@@ -146,10 +147,10 @@ trap '' PIPE
# Run scripts to set any environment variables or do any other system-specific setup needed
#
-if test -d /etc/asterisk/startup.d; then
- for script in /etc/asterisk/startup.d/*.sh; do
- if test -r ${script}; then
- . ${script}
+if test -d "${ASTETCDIR}/startup.d"; then
+ for script in "${ASTETCDIR}/startup.d/"*.sh; do
+ if test -r "${script}"; then
+ . "${script}"
fi
done
fi