From: root Date: Fri, 7 Nov 2008 11:41:14 +0000 (+0100) Subject: system: Let update-php.ini also include a php.ini.local X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=7cff1da7d1aa69b2267315410b5d601f44742b80;p=matthijs%2Fservers%2Fdrsnuggles.git system: Let update-php.ini also include a php.ini.local --- diff --git a/usr/local/bin/update-php.ini b/usr/local/bin/update-php.ini index e801500..3147c93 100755 --- a/usr/local/bin/update-php.ini +++ b/usr/local/bin/update-php.ini @@ -1,8 +1,10 @@ #!/bin/sh -# This script will merge the main php.ini with site specific additions into a site specific php.ini. +# This script will merge the main php.ini with local and site specific +# additions into a site specific php.ini. BASE=/etc/php5/cgi/php.ini +LOCAL=/etc/php5/cgi/php.ini.local SITES=/data/www/* CONFIN=conf/php.ini.override CONFOUT=conf/php.ini @@ -22,18 +24,22 @@ for SITE in $SITES; do ; ; Do NOT edit this file directly. ; -; You should instead edit $IN and run $0 afterwards. +; You should instead edit $IN (for site-specific config) or $LOCAL (for global +; config) and run $0 afterwards. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Begin included $BASE ;;; +;;; Begin included $BASE (this is the default config from php) ;;; EOF cat $BASE >> $OUT echo -e "\n;;; End included $BASE ;;;\n" >> $OUT - echo -e "\n;;; Begin included $IN ;;;\n" >> $OUT + echo -e "\n;;; Begin included $LOCAL (these are global config changes) ;;;\n" >> $OUT + cat $LOCAL >> $OUT + echo -e "\n;;; End included $LOCAL ;;;\n" >> $OUT + echo -e "\n;;; Begin included $IN (these are config changes specific to this site) ;;;\n" >> $OUT cat $IN >> $OUT echo -e "\n;;; End included $IN ;;;\n" >> $OUT done