mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-07 09:41:39 +01:00
30 lines
341 B
Bash
30 lines
341 B
Bash
#!/bin/sh
|
|
|
|
phplist="php81 php8 php7"
|
|
letsencrypt=/usr/sbin/lefh
|
|
|
|
find_php() {
|
|
local x= path=
|
|
|
|
for x in $phplist; do
|
|
path=$(which $x)
|
|
|
|
if [ -n "$path" ]; then
|
|
echo $path
|
|
break
|
|
fi
|
|
done
|
|
}
|
|
|
|
# start
|
|
php=$(find_php)
|
|
|
|
if [ -n "$php" ]; then
|
|
$php $letsencrypt "$@"
|
|
else
|
|
printf "ERROR: missing php interpreter\n"
|
|
exit 1
|
|
fi
|
|
|
|
exit $?
|