<?xml version="1.0" encoding="utf-8"?>
<creole>
    <files>
        <file filelist='etherpad' name='/usr/share/eole/mysql/etherpad/gen/etherpad-create.sql' rm='True' mkdir='True'/>
        <file filelist='etherpad' name='/usr/share/eole/firewall/00_web_etherpad.fw' source='etherpad-firewall.fw' rm='True' mkdir='True'/>
    </files>
    <containers>
        <container name='web'>
	    <package>etherpad-apps</package>
            <service method="apache" servicelist="etherpad">etherpad</service>
            <service servicelist="etherpad">etherpad-apps</service>

            <file filelist='etherpad' name='/etc/cron.d/etherpad' source='etherpad.cron' rm='True'/>
            <file filelist='etherpad' name='/etc/apache2/sites-available/etherpad' source='etherpad-apache.conf'/>
            <file filelist='etherpad' name='/etc/pm2/etherpad.json' source='etherpad-pm2.json'/>
            <file filelist='etherpad' name='/usr/share/eole/nodejs/etherpad/settings.json' source='etherpad-settings.json' rm='True'/>
            <file filelist='etherpad' name='/usr/share/eole/nodejs/etherpad/eoleDeps.sh' source='etherpad-eoleDeps.sh' rm='True'/>

            <!-- fichier de configuration pour etherhome (gestion des pads) -->
            <file filelist='etherpad' name='/var/www/html/etherhome/confSqlEtherpad.inc.php' source='etherpad-etherhome.php' rm='True'/>

        </container>
    </containers>
    <variables>
        <family name='applications web'>
            <variable name='activer_etherpad' type='oui/non' description='Activer Etherpad-Lite (éditeur de texte collaboratif)'>
                <value>oui</value>
            </variable>
            <variable name="etherpad_port" type="string" description="Port d'écoute d'etherpad">
                <value>9001</value>
            </variable>
        </family>
    </variables>
    <constraints>
        <condition name='hidden_if_in' source='activer_etherpad'>
            <param>non</param>
            <target type='filelist'>etherpad</target>
            <target type='servicelist'>etherpad</target>
            <target type='variable'>etherpad_port</target>
        </condition>
    </constraints>
    <help>
        <variable name='activer_etherpad'>Etherpad est un éditeur de texte collaboratif en ligne propulsé par Node.js</variable>
    </help>
</creole>
