<?xml version="1.0" encoding="utf-8"?>
<creole>
    <files>
       <!-- fichier de configuration pour la sauvegarde bareos -->
       <file filelist='dokuwiki-bareos' name='/etc/bareos/bareosfichiers.d/dokuwiki.conf' source='dokuwiki-bareos.conf' rm='True'/>
    </files>

    <containers>
        <container name='web'>
            <package>dokuwiki-apps</package>
            <!-- fichier de configuration de apache -->
            <file filelist='dokuwiki' name='/etc/apache2/sites-available/dokuwiki' source="dokuwiki-apache.conf"/>

            <!-- fichier de configuration de dokuwiki -->
            <file filelist='dokuwiki' name='/var/www/html/dokuwiki/conf/dokuwiki.php' source='dokuwiki-dokuwiki.php' rm='True' owner='www-data' mode='700'/>
            
            <!-- Service Apache -->
            <service method="apache" servicelist="dokuwiki">dokuwiki</service>
        </container>
    </containers>

    <variables>
        <family name='applications web'>
            <variable name='activer_dokuwiki' type='oui/non' description='Activer Dokuwiki'>
                <value>oui</value>
            </variable>
        </family>
    </variables>

    <constraints>
        <condition name='hidden_if_in' source='activer_apache'>
            <param>non</param>
            <target type='filelist'>dokuwiki</target>
            <target type='filelist'>dokuwiki-bareos</target>
            <target type='servicelist'>dokuwiki</target>
        </condition>
                
        <condition name='hidden_if_in' source='activer_dokuwiki'>
            <param>non</param>
            <target type='filelist'>dokuwiki</target>
             <target type='filelist'>dokuwiki-bareos</target>
            <target type='servicelist'>dokuwiki</target>
        </condition>

        <condition name='disabled_if_in' source='activer_bareos_dir' fallback='True'>
            <param>non</param>
            <target type='filelist'>dokuwiki-bareos</target>			
		</condition>        
    </constraints>
    
    <help>
        <variable name='activer_dokuwiki'>DokuWiki est un Wiki conforme aux standards et simple à utiliser</variable>
    </help>
</creole>
