2 OLDCFG
=/old
/opt
/iserv
/idesk
/inc
/error-reporter
/config.inc.rpmsave
3 NEWCFG
=/usr
/share
/iserv
/www
/inc
/mod_error-reporter
/config.inc
5 if [ ! -e "$OLDCFG" ]; then
6 echo "$OLDCFG does not exist."
10 touch $NEWCFG ||
exit 1;
11 chmod u
+wr
$NEWCFG ||
exit 1;
12 chown www-data
$NEWCFG ||
exit 1;
14 # filter unused options
15 cat $OLDCFG|
grep -v setAdminGroups|
grep -v setLog|
grep -v @package
> $NEWCFG
17 # convert admin groups to group privileges
18 ADMGROUPS
=$
(grep setAdminGroups
$OLDCFG|
sed -e 's/,//g' -e "s/.*array[^(]*(\([^)]*\)).*/\1/" -e "s/[\"\']/ /g")
19 for i
in $ADMGROUPS; do
20 psql
-c "INSERT INTO privileges_assign (act,privilege) VALUES('$i','mod_errorreporter_admin');" > /dev
/null ||
exit 1;
21 echo "added adminship for group '$i'"
24 rm -f $OLDCFG ||
(echo "Error: Please remove the old config file by hand!" && exit 1);
This page took 0.043711 seconds and 5 git commands to generate.