"/etc/apache2/sites-available/$site.conf"
if [ "$ENABLE_VHOST" = "yes" ]; then
if ! a2ensite $site > /dev/null 2>&1; then
if ! {
a2ensite "$site" > /dev/null 2>&1 ||
a2ensite "${site}.conf" > /dev/null 2>&1
}; then
echo "Warning: problem enabling $site in Apache" >&2
fi
if [ "$op" = create ] || [ "$op" = populate ] || [ "$op" = use ]
then
# Reconfigure Apache.
a2ensite "$name"
a2ensite "$name" > /dev/null 2>&1 ||
a2ensite "${name}.conf" > /dev/null 2>&1
echo "Warning: problem enabling $name in Apache" >&2
service apache2 restart
# Start Zebra.
rm -r "/var/run/koha/$name"
getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha"
# in case the site has already been disabled, we don't want to break the loop now.
a2dissite "$name" || /bin/true
a2dissite "$name" > /dev/null 2>&1 || a2dissite "${name}.conf" > /dev/null 2>&1 || /bin/true
done
-