move /var/alternc-specific commands from alternc.install to postinst

This commit is contained in:
Antoine Beaupré 2008-10-04 16:48:30 +00:00
parent 1dfc9e15ec
commit 270c7a6e37
2 changed files with 22 additions and 14 deletions

22
debian/postinst vendored
View File

@ -157,6 +157,13 @@ EOF
. $CONFIGFILE
fi
# /var/alternc/dns/d/www.example.com
FQDN_LETTER="`echo $FQDN | sed -e 's/.*\.\([^\.]\)[^\.]*\.[^\.]*$/\1/'`"
if [ "$FQDN_LETTER" = "$FQDN" ]
then
FQDN_LETTER="_"
fi
# Erase all apacheconf file
# They will be regenerated without the bug by upgrade_check.sh below.
if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then
@ -174,6 +181,21 @@ EOF
echo "<?php $include_str ?>" >> $pma_config
fi
# Add access to the management panel
ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN
# Bind stuff
touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
chown root:bind /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
chmod 640 /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
touch /var/run/alternc/refresh_slave
/usr/lib/alternc/slave_dns
# Apache will not start without this file
touch /var/alternc/apacheconf/override_php.conf
# Update l18n files
/usr/share/alternc/install/dopo.sh
# important: postinst gele sans ca
db_stop

View File

@ -181,21 +181,7 @@ tar -zcf "$INSTALLED_CONFIG_TAR" -C / $CONFIG_FILES
########################################################################
# Ad-hoc fixes
#
# Add access to the management panel
ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN
# Update l18n files
/usr/share/alternc/install/dopo.sh
# Bind stuff
touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
chown root:bind /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
chmod 640 /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
touch /var/run/alternc/refresh_slave
/usr/lib/alternc/slave_dns
# Apache will not start without this file
touch /var/alternc/apacheconf/override_php.conf
php="`ls /usr/lib/apache*/*/*php*.so | sed -e 's/^.*libphp\(.\)\.so$/php\1/' | tail -1`"
if [ -x /usr/sbin/apache ]
then