#!/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
;
; 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