better link handling

This commit is contained in:
Roland Gruber 2016-04-02 14:45:33 +02:00
parent ad2002c3e1
commit 8511a05a72
1 changed files with 10 additions and 6 deletions

View File

@ -72,21 +72,25 @@ if [ "$1" = "configure" ]; then
ln -s /etc/$server/mods-available/php5.conf /etc/$server/mods-enabled/php5.conf ln -s /etc/$server/mods-available/php5.conf /etc/$server/mods-enabled/php5.conf
fi fi
fi fi
if [ -f /etc/$server/mods-available/version.load ]; then
if [ ! -f /etc/$server/mods-enabled/version.load -a ! -h /etc/$server/mods-enabled/version.load ]; then
ln -s /etc/$server/mods-available/version.load /etc/$server/mods-enabled/version.load
fi
fi
fi fi
if [ -d /etc/$server/conf.d -a ! -e /etc/$server/conf.d/ldap-account-manager ]; then if [ -d /etc/$server/conf.d -a ! -e /etc/$server/conf.d/ldap-account-manager ]; then
if [ -h /etc/$server/conf.d/ldap-account-manager ]; then
rm /etc/$server/conf.d/ldap-account-manager
fi
ln -s /etc/ldap-account-manager/apache.conf /etc/$server/conf.d/ldap-account-manager ln -s /etc/ldap-account-manager/apache.conf /etc/$server/conf.d/ldap-account-manager
restart="$restart $server" restart="$restart $server"
fi fi
if [ -d /etc/$server/conf-available ] && [ -d /etc/$server/conf-enabled ]; then if [ -d /etc/$server/conf-available ] && [ -d /etc/$server/conf-enabled ]; then
if [ ! -e /etc/$server/conf-available/ldap-account-manager ]; then if [ ! -e /etc/$server/conf-available/ldap-account-manager.conf ]; then
if [ -h /etc/$server/conf-available/ldap-account-manager.conf ]; then
rm /etc/$server/conf-available/ldap-account-manager.conf
fi
ln -s /etc/ldap-account-manager/apache.conf /etc/$server/conf-available/ldap-account-manager.conf ln -s /etc/ldap-account-manager/apache.conf /etc/$server/conf-available/ldap-account-manager.conf
fi fi
if [ ! -e /etc/$server/conf-enabled/ldap-account-manager.conf ]; then if [ ! -e /etc/$server/conf-enabled/ldap-account-manager.conf ]; then
if [ -h /etc/$server/conf-enabled/ldap-account-manager.conf ]; then
rm /etc/$server/conf-enabled/ldap-account-manager.conf
fi
ln -s ../conf-available/ldap-account-manager.conf /etc/$server/conf-enabled/ldap-account-manager.conf ln -s ../conf-available/ldap-account-manager.conf /etc/$server/conf-enabled/ldap-account-manager.conf
fi fi
restart="$restart $server" restart="$restart $server"