aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-01 12:17:33 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-01 12:17:33 +0000
commitf6fb0900e1a8399fb7e9a7234e2e566d66e724f4 (patch)
tree0c87683046924b9f0172375f2e52ea1c87dfa16d /contrib
parent45c236b7785dcc65b555e6e46b89bc8e4e6009cb (diff)
Make safe_asterisk work on dash/sh/bash etc.
(closes issue #13111) Reported by: pabelanger Patches: 2008071901_issue13111_safe_asterisk.diff uploaded by mvanbaak (license 7) Tested by: mvanbaak, pabelanger git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135061 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rw-r--r--contrib/scripts/safe_asterisk4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk
index c8841f3ed..6ff110bfd 100644
--- a/contrib/scripts/safe_asterisk
+++ b/contrib/scripts/safe_asterisk
@@ -28,7 +28,7 @@ PRIORITY=0
# set to the system's maximum files open devided by two, if not set here.
# MAXFILES=32768
-function message() {
+message() {
echo "$1" >&2
if [ "$SYSLOG" != "" ]; then
logger -p "${SYSLOG}.warn" -t safe_asterisk[$$] "$1"
@@ -141,7 +141,7 @@ run_asterisk()
if [ "$TTY" != "" ]; then
cd /tmp
stty sane < /dev/${TTY}
- nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
+ nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
else
cd /tmp
nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}