467e17af5d3d3e1563fd789706f789ec97098421
2 # called from iservchk if old config exists
3 OLDCFG
=/old
/opt
/iserv
/idesk
/inc
/error-reporter
/config.inc.rpmsave
4 NEWCFG
=/usr
/share
/iserv
/www
/inc
/mod_error-reporter
/config.inc
6 touch $NEWCFG ||
(echo "FATAL: Could not create $NEWCFG!" && exit 255);
7 chmod u
+wr
$NEWCFG ||
(echo "FATAL: Could not chmod +uwr $NEWCFG!" && exit 255);
8 chown www-data
$NEWCFG ||
(echo "FATAL: Could not chown www-data $NEWCFG!" && exit 255);
10 # filter unused options
11 cat $OLDCFG|
grep -v setAdminGroups|
grep -v setLog|
grep -v @package
> $NEWCFG
13 # convert admin groups to group privileges
14 ADMGROUPS
=$
(grep setAdminGroups
$OLDCFG|
sed -e 's/,//g' -e "s/.*array[^(]*(\([^)]*\)).*/\1/" -e "s/[\"\']/ /g")
15 for i
in $ADMGROUPS; do
16 psql
-c "INSERT INTO privileges_assign (act,privilege) VALUES('$i','mod_errorreporter_admin');" > /dev
/null ||
exit 1;
17 echo "added adminship for group '$i'"
20 mv $OLDCFG $OLDCFG.converted
21 [ -e $OLDCFG ] && echo "Done. Please remove the old config file ($OLDCFG) by hand!" && exit 255;
This page took 0.0489 seconds and 3 git commands to generate.