aports/testing/hiawatha/letsencrypt.helper
Stuart Cardall b5913b10cf testing/hiawatha: add letsencrypt subpkg / helper
* moves the letsencrypt php scripts to a subpkg for running outside
  containers

* adds a wrapper script to detect a php interpreter
2019-04-14 22:37:35 +00:00

30 lines
330 B
Bash

#!/bin/sh
phplist="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 $?