clean config, support read-only non-root docker
All checks were successful
docker / docker (push) Successful in 22s
All checks were successful
docker / docker (push) Successful in 22s
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
@ -1,11 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/sh -e
|
||||
|
||||
if [ ! -f '/var/www/html/4get/data/config.php' ] && [ -f './gen_config.php' ]
|
||||
then
|
||||
php ./gen_config.php
|
||||
rm -f ./gen_config.php
|
||||
config='/srv/4get/data/config.php'
|
||||
defconfig='/srv/4get/data/config.def.php'
|
||||
|
||||
# check for the configuration file
|
||||
if [ ! -f "${config}" ]; then
|
||||
echo "configuration file not specified"
|
||||
echo "here's the default configuration, modify and mount this to ${config}"
|
||||
echo
|
||||
cat "${defconfig}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starting up apache2"
|
||||
exec httpd -DFOREGROUND
|
||||
# execute apache
|
||||
echo "starting apache web server"
|
||||
exec httpd -D FOREGROUND
|
||||
|
Reference in New Issue
Block a user