updated how to find the initial configuration file
This commit is contained in:
parent
08f6ba39f3
commit
601d419dc0
@ -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
|
||||
|
||||
|
@ -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 "$@"
|
||||
|
@ -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);
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user