changed config.php.in to recognize the apache environment variable CODEPOT_CONFIG_FILE
This commit is contained in:
parent
3860a7bd56
commit
95a8c0530e
@ -23,15 +23,15 @@ cd codepot && \
|
|||||||
--with-cachedir=/var/cache/codepot \
|
--with-cachedir=/var/cache/codepot \
|
||||||
--with-phpextdir=`php-config --extension-dir` \
|
--with-phpextdir=`php-config --extension-dir` \
|
||||||
--with-phpextinidir=`php-config --ini-dir | sed 's|/cli/|/apache2/|g'` && \
|
--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' \
|
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_driver[[:space:]]*=[[:space:]]*""$|database_driver = "sqlite"|g' \
|
||||||
-e 's|^database_use_pdo[[:space:]]*=[[:space:]]*"no"$|database_use_pdo = "yes"|g' /etc/codepot/codepot.ini && \
|
-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' /usr/sbin/codepot-user && \
|
||||||
sed -ri -e 's|Digest::SHA1|Digest::SHA|g' /etc/codepot/perl/Codepot/AccessHandler.pm && \
|
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 && \
|
cp -pf /etc/codepot/codepot.httpd /etc/apache2/conf-enabled/codepot.conf && \
|
||||||
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf
|
echo "PerlSwitches -Mlib=/etc/codepot/perl" >> /etc/apache2/conf-enabled/perl.conf
|
||||||
|
|
||||||
|
@ -191,5 +191,11 @@ function load_ini ($file)
|
|||||||
return TRUE;
|
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);
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user