move /var/alternc-specific commands from alternc.install to postinst
This commit is contained in:
parent
1dfc9e15ec
commit
270c7a6e37
|
@ -157,6 +157,13 @@ EOF
|
||||||
. $CONFIGFILE
|
. $CONFIGFILE
|
||||||
fi
|
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
|
# Erase all apacheconf file
|
||||||
# They will be regenerated without the bug by upgrade_check.sh below.
|
# They will be regenerated without the bug by upgrade_check.sh below.
|
||||||
if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then
|
if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then
|
||||||
|
@ -174,6 +181,21 @@ EOF
|
||||||
echo "<?php $include_str ?>" >> $pma_config
|
echo "<?php $include_str ?>" >> $pma_config
|
||||||
fi
|
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
|
# important: postinst gele sans ca
|
||||||
db_stop
|
db_stop
|
||||||
|
|
||||||
|
|
|
@ -181,21 +181,7 @@ tar -zcf "$INSTALLED_CONFIG_TAR" -C / $CONFIG_FILES
|
||||||
########################################################################
|
########################################################################
|
||||||
# Ad-hoc fixes
|
# 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`"
|
php="`ls /usr/lib/apache*/*/*php*.so | sed -e 's/^.*libphp\(.\)\.so$/php\1/' | tail -1`"
|
||||||
if [ -x /usr/sbin/apache ]
|
if [ -x /usr/sbin/apache ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue