removed stuff from makefile that is unneccessary for development and packaging (no...
[iserv-mod-error-reporter.git] / maint / update-config.sh
1 #!/bin/bash
2 # called by iservchk
3 # convert the old, PHP based config file to /etc/iserv/config
4
5 OLDCFG=/usr/share/iserv/www/inc/mod_error-reporter/config.inc
6 NEWCFG=/etc/iserv/config
7 TMPCFG=`mktemp`
8 rm -rf $TMPCFG
9
10 # mail notify
11 if [ -n "`grep 'setMailNotify(' $OLDCFG|grep false`" ]; then
12 sed 's/^ErrorReporterMailNotify.\+/ErrorReporterMailNotify = false/' $NEWCFG > $TMPCFG
13 mv $TMPCFG $NEWCFG
14 fi;
15
16 # mail notify address
17 mailNotifyAddress=`grep setMailNotifyAddr $OLDCFG | sed -e 's/\$cfgErrors->setMailNotifyAddr//' | tr -d '();'|tr "'();" '"'`
18 if [ -n "$mailNotifyAddress" ]; then
19 sed "s/^ErrorReporterMailAddress.\+/ErrorReporterMailAddress = $mailNotifyAddress/" $NEWCFG > $TMPCFG
20 mv $TMPCFG $NEWCFG
21 fi;
22
This page took 0.048104 seconds and 5 git commands to generate.