diff --git a/codepot/docker/build-ubnt2004.sh b/codepot/docker/build-ubnt2004.sh index 4020a4f9..133abf24 100755 --- a/codepot/docker/build-ubnt2004.sh +++ b/codepot/docker/build-ubnt2004.sh @@ -23,15 +23,15 @@ cd codepot && \ --with-cachedir=/var/cache/codepot \ --with-phpextdir=`php-config --extension-dir` \ --with-phpextinidir=`php-config --ini-dir | sed 's|/cli/|/apache2/|g'` && \ -make && make install && rm -rf /var/lib/codepot/* && \ +make && make install && \ +install -m 0755 -D -t /usr/sbin docker/apache2-fg.sh && \ +cd ../.. && \ +rm -rf /var/lib/codepot/* && \ sed -ri -e 's|^database_hostname[[:space:]]*=[[:space:]]*"localhost"$|database_hostname = "/var/lib/codepot/codepot.db"|g' \ -e 's|^database_driver[[:space:]]*=[[:space:]]*""$|database_driver = "sqlite"|g' \ -e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' /etc/codepot/codepot.ini && \ sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /usr/sbin/codepot-user && \ sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /etc/codepot/perl/Codepot/AccessHandler.pm && \ -install -m 0755 -D -t /usr/sbin docker/apache2-fg.sh && \ -cd ../.. && \ -\ cp -pf /etc/codepot/codepot.httpd /etc/apache2/conf-enabled/codepot.conf && \ echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf diff --git a/codepot/src/config.php.in b/codepot/src/config.php.in index f3789d90..0aed68dc 100644 --- a/codepot/src/config.php.in +++ b/codepot/src/config.php.in @@ -191,5 +191,11 @@ function load_ini ($file) return TRUE; } -load_ini (CODEPOT_CFG_DIR.'/codepot.ini'); +$codepot_ini_file = CODEPOT_CFG_DIR.'/codepot.ini'; +if (function_exists('apached_getenv')) +{ + $tmp = apache_getenv('CODEPOT_CONFIG_FILE'); + if ($tmp != '') $codepot_ini_file = $tmp; +} +load_ini ($codepot_ini_file); ?>