mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-16 19:16:42 +02:00
29 lines
341 B
Bash
29 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 $?
|