aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hiawatha/letsencrypt.helper
blob: 8affbb3deb23d0cb61f6e7260ef903cbdf0a6aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/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 $?