You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
320 B
12 lines
320 B
#!/bin/sh |
|
set -e |
|
|
|
PORT=${PORT:-9876} |
|
if ! [ "$PORT" -ge 1 ] 2>/dev/null || ! [ "$PORT" -le 65535 ] 2>/dev/null; then |
|
echo "Warning: Invalid PORT '$PORT', using default 9876" |
|
PORT=9876 |
|
fi |
|
|
|
envsubst '${PORT}' < /usr/local/apache2/conf/httpd.conf.template > /usr/local/apache2/conf/httpd.conf |
|
|
|
exec httpd -D FOREGROUND
|
|
|