updated how to find the initial configuration file

This commit is contained in:
hyung-hwan 2021-09-07 10:21:40 +00:00
parent 08f6ba39f3
commit 601d419dc0
3 changed files with 8 additions and 9 deletions

View File

@ -9,7 +9,7 @@ RUN dnf install -y \
httpd php php-mysqli php-gd php-pdo \
perl-Digest-SHA \
perl-DBD-MySQL perl-DBD-SQLite perl-LDAP \
mod_dav_svn mod_perl diffutils sqlite3
mod_dav_svn mod_perl diffutils sqlite
RUN dnf install -y php-devel subversion-devel perl-devel make

View File

@ -50,13 +50,9 @@ chown -R apache:apache /var/lib/codepot /var/cache/codepot /var/log/codepot
[ ! -f /var/lib/codepot/codepot.ini ] && cp -pf /etc/codepot/codepot.ini /var/lib/codepot/codepot.ini
#grep -F -q '<Location "/codepot">' /etc/httpd/conf-enabled/codepot.conf || {
# cat <<EOF >> /etc/httpd/conf-enabled/codepot.conf
#<Location "/codepot">
# SetEnv CODEPOT_CONFIG_FILE /var/lib/codepot/codepot.ini
#</Location>
#EOF
#}
grep -F -q 'env[CODEPOT_CONFIG_FILE]' /etc/php-fpm.d/www.conf || {
echo 'env[CODEPOT_CONFIG_FILE] = /var/lib/codepot/codepot.ini' >> /etc/php-fpm.d/www.conf
}
php-fpm
exec httpd -DFOREGROUND "$@"

View File

@ -192,10 +192,13 @@ function load_ini ($file)
}
$codepot_ini_file = CODEPOT_CFG_DIR.'/codepot.ini';
if (function_exists('apache_getenv'))
$tmp = getenv('CODEPOT_CONFIG_FILE');
if ($tmp != '') $codepot_ini_file = $tmp;
elseif (function_exists('apache_getenv'))
{
$tmp = apache_getenv('CODEPOT_CONFIG_FILE');
if ($tmp != '') $codepot_ini_file = $tmp;
}
load_ini ($codepot_ini_file);
?>