-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
23 lines (18 loc) · 820 Bytes
/
entrypoint.sh
File metadata and controls
23 lines (18 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -e -o pipefail
echo "+ Using the following values : "
echo " - NEWRELIC_APPNAME: ${NEWRELIC_APPNAME}"
echo " - NEWRELIC_LICENSE: ${NEWRELIC_LICENSE}"
echo "+ creating the new config file"
if [ ! -f /usr/local/etc/php/conf.d/newrelic.ini ]; then
cp /usr/local/etc/php/conf.d/newrelic.ini.template /usr/local/etc/php/conf.d/newrelic.ini
for nr_var in $(compgen -A variable NEWRELIC_); do
nr_setting=$(echo ${nr_var} | tr 'A-Z' 'a-z' | sed -e 's/_/./g')
nr_value="${!nr_var}"
echo -n "- applying setting ${nr_setting}=${nr_value} : "
crudini --existing --verbose --set /usr/local/etc/php/conf.d/newrelic.ini \
"newrelic" "${nr_setting}" "${nr_value}"
done
fi
echo "+ call the original entrypoint"
exec /usr/local/bin/docker-entrypoint.sh "$@"