aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-19 21:11:31 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-19 21:11:31 +0000
commit7e5f8397c920614af96a4510da9ea06b84064201 (patch)
treefff81ec1f56158fec084a7c85188fc706267290a /contrib
parent09d0ad17dfc3724d2926db10ffd777c7a0173b5e (diff)
Merged revisions 21638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r21638 | kpfleming | 2006-04-19 16:10:41 -0500 (Wed, 19 Apr 2006) | 2 lines support system-specific scripts in safe_asterisk, before starting Asterisk proper ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21639 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rw-r--r--contrib/scripts/safe_asterisk14
-rw-r--r--contrib/scripts/safe_asterisk.87
2 files changed, 18 insertions, 3 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk
index 994d2b9fe..3849e836e 100644
--- a/contrib/scripts/safe_asterisk
+++ b/contrib/scripts/safe_asterisk
@@ -94,9 +94,17 @@ if [ ! -w ${DUMPDROP} ]; then
exit 1
fi
-#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.