diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-19 21:10:41 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-19 21:10:41 +0000 |
commit | 79618a5ab65def487c109538ccc4935bf9cb7cd5 (patch) | |
tree | b4c92510efdf14ed441f1767faeb04b628a77128 /contrib | |
parent | 4756b9a3bc303b80289e6a2377d5b62d58c4691e (diff) |
support system-specific scripts in safe_asterisk, before starting Asterisk proper
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@21638 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/scripts/safe_asterisk | 14 | ||||
-rw-r--r-- | contrib/scripts/safe_asterisk.8 | 7 |
2 files changed, 18 insertions, 3 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk index 2cfab55da..5a8808a56 100644 --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -34,9 +34,17 @@ fi # ulimit -c unlimited -#launch_asterisk() -#{ -#} +# +# Run scripts to set any environment variables or do any other system-specific setup needed +# + +if [ -d /etc/asterisk/startup.d ]; then + for script in /etc/asterisk/startup.d/*.sh; do + if [ -x ${script} ]; then + source ${script} + fi + done +fi run_asterisk() { diff --git a/contrib/scripts/safe_asterisk.8 b/contrib/scripts/safe_asterisk.8 index 277fa5f8d..ebd95142a 100644 --- a/contrib/scripts/safe_asterisk.8 +++ b/contrib/scripts/safe_asterisk.8 @@ -40,6 +40,13 @@ safe_asterisk runs in that directory, rather than in / as usual. If core files were generated there, they may be .RE +.B /etc/asterisk/startup.d +.RS +Files in this directory will be 'source'd by the safe_asterisk script before +it starts Asterisk proper, allowing them to set additional environment variables +or run any other steps that are needed for your system. +.RE + .SH BUGS While showing the output on a console is useful, using screen(1) as the terminal may be better. |