File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -22,19 +22,23 @@ CUSTOM_INI_FILE_NAME='ddtrace-custom.ini'
22
22
23
23
PATH=" ${PATH} :/usr/local/bin"
24
24
25
+ function println() {
26
+ echo -e ' ###' " $@ "
27
+ }
28
+
25
29
# We attempt in this order the following binary names:
26
- # 1. php
27
- # 2. php8 (some alpine versions install php 8.x from main repo to this binary)
28
- # 3. php7 (some alpine versions install php 7.x from main repo to this binary)
29
- # 4. php5 (some alpine versions install php 5.x from main repo to this binary)
30
- if [ -z " $DD_TRACE_PHP_BIN " ]; then
31
- DD_TRACE_PHP_BIN=$( command -v php || true)
32
- fi
33
- if [ -z " $DD_TRACE_PHP_BIN " ]; then
34
- DD_TRACE_PHP_BIN=$( command -v php8 || true)
35
- fi
30
+ for name in php php8 php83 php82 php81 php80 php7 php74 php73 php72 php71 php70
31
+ do
32
+ if [ -z " $DD_TRACE_PHP_BIN " ]; then
33
+ DD_TRACE_PHP_BIN=$( command -v " $name " || true)
34
+ else
35
+ break
36
+ fi
37
+ done
38
+
36
39
if [ -z " $DD_TRACE_PHP_BIN " ]; then
37
- DD_TRACE_PHP_BIN=$( command -v php7 || true)
40
+ println ' Unable to locate PHP binary'
41
+ exit 0
38
42
fi
39
43
40
44
function invoke_php() {
@@ -46,10 +50,6 @@ function invoke_php() {
46
50
$DD_TRACE_PHP_BIN -d memory_limit=128M " $* "
47
51
}
48
52
49
- function println() {
50
- echo -e ' ###' " $@ "
51
- }
52
-
53
53
function append_configuration_to_file() {
54
54
tee -a " $@ " << EOF
55
55
; Autogenerated by the Datadog post-install.sh script
You can’t perform that action at this time.
0 commit comments