/usr/share/fusionforge/post-install.d/mta-exim4/upgrade-conf.sh is in fusionforge-mta-exim4 6.0.5-2ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #!/bin/bash
# Upgrade Exim4 configuration
#
# Copyright (C) 2014 Inria (Sylvain Beucler)
#
# This file is part of FusionForge. FusionForge is free software;
# you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software
# Foundation; either version 2 of the Licence, or (at your option)
# any later version.
#
# FusionForge is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with FusionForge; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
set -e
PREVVER=${1:-0.0}
# 5.3 -> 6.0
if [ $(php -r "print version_compare('$PREVVER', '5.3.50');") -eq -1 ]; then
if [ -e /etc/exim4/conf.d/router/01_gforge_forwards ]; then
mv /etc/exim4/conf.d/router/01_gforge_forwards \
/etc/exim4/conf.d/router/01_fusionforge_forwards
fi
sed -i '/^### Next line inserted by GForge/d' /etc/aliases
cfgs_exim4_main=''
cfgs_exim4_router=''
if [ -e /etc/exim4/exim4.conf.template ]; then
cfgs_exim4_main="$cfgs_exim4_main /etc/exim4/exim4.conf.template"
cfgs_exim4_router="$cfgs_exim4_router /etc/exim4/exim4.conf.template"
fi
if [ -e /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs ]; then
cfgs_exim4_main="$cfgs_exim4_main /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs"
# + /etc/exim4/conf.d/router/01_fusionforge_forwards entirely generated
fi
if [ -e /etc/exim4/exim4.conf ]; then
cfgs_exim4_main="$cfgs_exim4_main /etc/exim4/exim4.conf"
cfgs_exim4_router="$cfgs_exim4_router /etc/exim4/exim4.conf"
fi
if [ -e /etc/exim/exim.conf ]; then
cfgs_exim4_main="$cfgs_exim4_main /etc/exim/exim.conf"
cfgs_exim4_router="$cfgs_exim4_router /etc/exim/exim.conf"
fi
for i in $cfgs_exim4_main; do
# De-configure so it can be properly re-configured with new db auth
sed -i $i \
-e '/^GFORGE_DOMAINS=/d' \
-e '/^hide pgsql_servers =/d' \
-e '/domainlist local_domains.*/ s/:GFORGE_DOMAINS//'
done
for i in $cfgs_exim4_router; do
sed -i -e 's/\(^# \(BEGIN\|END\)\) GFORGE BLOCK/\1 FUSIONFORGE BLOCK/' $i
done
fi
|