#!/bin/bash

#Il faut un sites-available et non un conf-available

path=$(CreoleGet container_path_web)

#desactive le conf-enabled
[ -f $path/etc/apache2/conf-enabled/bareos-webui.conf ] && CreoleRun "a2disconf bareos-webui" "web"

#copie en sites-available
sites_available=$path/etc/apache2/sites-available/bareos-webui
conf_available=$path/etc/apache2/conf-available/bareos-webui.conf
[ ! -f $sites_available ] && cp -a $conf_available $sites_available

exit 0
