Location:  WebCFG documentation

webcfg.xml example

	
<?xml version="1.0" encoding="UTF-8"?>
<webcfg xsi:noNamespaceSchemaLocation="webcfg.xsd" 
        xmlns="http://www.webcfg.com/webcfg" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        default-wcapp="intro">
         
    <!-- ======================================
                         Authentifications
          ====================================== -->
    <authentifications>
        <simpleset>
            <simple id="simple.guest" username="guest"  password="guest" 
                    displayname="(Login: guest, password: guest)"/>

            <simple id="esx.ssh.faked" username="guest"  password="guest" 
                    hostname="esx01.domain.com, esx02.domain.com, esx03.domain.com"  showhostname="true" 
                    displayname="Choose a server to authenticate against (Login: guest, password: guest) - faked"/>

            <simple id="nas.ssh.faked" username="guest"  password="guest" 
                    hostname="nas01.domain.com, nas02.domain.com"  showhostname="true" 
                    displayname="Choose a server to authenticate against (Login: guest, password: guest) - faked"/>

            <simple id="kolab2.imap.faked" username="guest"  password="guest" 
                    displayname="Authenticate against cyrus IMAP server (Login: guest, password: guest) - faked"/>

            <simple id="multi.ssh.faked" username="guest"  password="guest" 
                    displayname="Authenticate against local ssh (Login: guest, password: guest) - faked"/>

            <simple id="spamassasin.ssh.faked" username="guest"  password="guest" 
                    displayname="Authenticate against your spamassasin server via ssh (Login: guest, password: guest) - faked"/>

            <simple id="ad.ldap.fake" username="guest"  password="guest" 
                    displayname="Authenticate against your windows AD server (Login: guest, password: guest) - faked"/>

        </simpleset>
        
        <pop3set>
            <pop3 id="localhost.pop3" hostname="localhost" />
            <pop3 id="mail.pop3" hostname="mail.domain.com" />
        </pop3set>
        
        <ldapset>
            <ldap id="localhost.ldap" hostname="localhost" />
            <ldap id="ad.ldap" hostname="ad1.domain.com" />
            <ldap id="openldap.ldap" hostname="myopenldap.domain.com" />
        </ldapset>

        <imapset>
            <imap id="localhost.imap" hostname="localhost" />
            <imap id="mail.imap" hostname="mail.domain.com" 
                  includes="root, user1, user2"
                  displayname="(IMAP credentials against mail.domain.com)"/>
            <imap id="kolab2.imap" 
                  hostname="mail.domain.com"  
                  showhostname="true"
                  displayname="(IMAP credentials against the selected cyrus-server)"/>
        </imapset>
        
        <sshset>
            <ssh id="kolab2.imap" 
                  hostname="localhost, 127.0.0.1"  
                  showhostname="true"
                  displayname="(IMAP credentials against the selected cyrus-server - Login: guest, Passwort: guest)"/>

            <ssh id="localhost.ssh" hostname="localhost" />
            <ssh id="ben.ssh"   hostname="benny.domain.com" 
                 displayname="(Authentification against benny.domain.com)"/>

            <ssh id="multi.ssh" hostname="multi" 
                 excludes="user1, user2"
                 displayname="(Authentification NIS - Use login: guest, password: guest)"/>

            <ssh id="esx.ssh" hostname="localhost, 127.0.0.1" 
                 includes="guest" showhostname="true" 
                 displayname="(only  guest access allowed, Login: guest, Password: guest)"/>
        </sshset>

        <nologin id="guest"/>

    </authentifications>


    <varset>
        <var name="global.template.dir" value="${config.dir}/wcapps"/>

        <!-- no demo - please edit and comment out this on your decision
            <var name="exe.prefix" value=""/>
            <var name="global.config.dir.local"  value="/srv/webcfg"/>
            <var name="dir.remote"        value="sftp://${config.username}:${config.password}@${config.hostname}"/>
            <var name="config.dir.remote" value="${dir.remote}${config.dir.local}"/>
            <var name="shell.ssh"        value="ssh://${config.username}:${config.password}@${config.hostname}"/>
            <var name="shell.rsh"        value="rsh://${config.username}:${config.password}@${config.hostname}"/>
            <var name="shell.local"      value="local://"/>
            <var name="shell"            value="${shell.ssh}"/>
        -->

        <!-- DEMO definitions -->
        <var name="exe.prefix.sh"  value="sh ${config.dir}/bin/printnow.sh [DEMO LNX-FAKE-CALL] "/>
        <var name="exe.prefix.bat" value=""${config.dir}/bin/printnow.bat" [DEMO WIN-FAKE-CALL] "/>
        <var name="exe.prefix"     value="${exe.prefix.${exe.suffix}}"/>

        <var name="global.config.dir.local"  value="${web.context}/data"/>
        <var name="config.dir.remote" value="${config.dir.local}"/>
        <var name="dir.remote"        value=""/>
        <var name="shell.ssh"         value="local://"/>
        <var name="shell.rsh"         value="local://"/>
        <var name="shell.local"       value="local://"/>
        <var name="shell"             value="${shell.local}"/>

    </varset>

   <!-- ======================================
                      Testbed
         ====================================== -->

    <wcapp id="testbed"    displayname="WebCFG testbed"  adminview="true" authref="simple.guest">
        <varset>
            <var name="template.dir" value="${global.template.dir}/testbed"/>
            <var name="action1" value="${sh} ${template.dir}/action1.${exe.suffix}"/>
            <var name="action2" value="${sh} ${template.dir}/myhandler1.${exe.suffix}"/>
        </varset>


        <fileset>
                <file id="intro" filename="${global.template.dir}/intro.txt" 
                 default-readonly="true" />

                <file id="file1" filename="${template.dir}/file1.txt" type="property"/>
                <file id="file2" filename="${template.dir}/file2.txt" type="plain"/>
                <file id="file3" filename="${template.dir}/file3.txt" type="plain"/>

        </fileset>

        <buttonset>
            <button id="save" displayname="Save" 
                    scope="local" successtext="Save successful.">
	        <save/>
            </button>
            <button id="save_bysession" displayname="Save with WebSession ID"   
                    successtext="Save by session successful">
                   <save filename="${file.filename}.${web.session.id}"/>
            </button>
            <button id="save_bytimestamp" displayname="Save with timestamp"   
                    successtext="Save by timestamp successful">
                   <save filename="${file.filename}.${timestamp}"/>
            </button>
            <button id="exec_popup_html" displayname="Exe popup in html"
	                successtext="Action1-html done successfully.">
                    <action id="a1" execute="${action1} 1"  popup="true" silent="false"/>
            </button>
            <button id="exec_popup_js" displayname="Exe with no popup/html"
	                successtext="Action1-js done successfully.">
                    <action id="a1" execute="${action1} 0"  popup="false"/>
            </button>
            <button id="exec_popup_silent" displayname="Exe with no popup/html"
	                successtext="Action1-silent done successfully.">
                    <action id="a1" execute="${action1} 0"  silent="true"/>
            </button>
            <button id="exec_confirm_question" displayname="Exe with confirm"
                    successtext="Action1-confirm done successfully.">
                    <confirm message="Do you really want to execute the sample script ?" type="question"/>
                    <action id="a1" execute="${action1} 0"  popup="false"/>
            </button>
       </buttonset>

        <handlerset>
            <handler  id="h1" interval="2" format="property">
                      <action execute="${action2}"/>
            </handler>
        </handlerset>
    </wcapp>
    
    <!-- ======================================
                      Intro
         ====================================== -->
    <wcapp id="intro"    displayname="Introduction"  adminview="true" >
        <fileset>
                <file id="intro" filename="${global.template.dir}/intro.txt" 
                      default-readonly="true" />
                <file id="homepage" filename="${global.template.dir}/homepage.txt" tab="Homepage"
                      default-readonly="true" />
        </fileset>
    </wcapp>


    <!-- ======================================
                            Hosts
         ====================================== -->
    <wcapp id="hosts.hosts" 
        style="dtn"
        displayname="DEMO: Hosts file (german, customized style)">
        <varset>
            <var name="template.dir" value="${global.template.dir}/hosts"/>
        </varset>

        <fileset>
            <file id="hosts" filename="${template.dir}/hosts" />
        </fileset>

        <buttonset>
            <button id="save" displayname="Save host file" 
                    scope="global" successtext="Save successful.">
	        <save/>
	    </button>
        </buttonset>

    </wcapp>


        <!-- ======================================
                                crontab
                 ====================================== -->
    <wcapp id="cron.crontab" 
        adminview="true"
        displayname="DEMO: Crontab"
        header="Information for schedular (crontab)">

        <varset>
                <var name="template.dir" value="${global.template.dir}/cron"/>
        </varset>

        <fileset>
                <file id="crontab" filename="${template.dir}/crontab" />
        </fileset>

        <buttonset>
            <button id="save" displayname="Save crontab now" 
                    scope="global" successtext="Save successful.">
	        <save/>
	    </button>
        </buttonset>
    </wcapp>

    <!-- ======================================
          VMBK3 - scripts for backup VMware ESX 3.x Server
         ====================================== -->
    <wcapp id="vmbk3" 
        displayname="DEMO: VMware ESX - vmbk3 backup script for VMWare ESX 3.x"
        adminview="true"
        style="vmts.net"
        header="Configuration of vmbk3 for VMware ESX Server 3.x"
        enable="true">

        <varset>
                <var name="template.dir" value="${global.template.dir}/vmbk3"/>
                <var name="version.vmbk" value="v3.0.0rev11" />

		        <!-- demo definition -->
                <var name="bin.dir" value="${template.dir}/tmp"/>
				<var name="config.dir.local" value="${template.dir}/tmp" />
				
                <!-- productive definition
                <var name="bin.dir" value="/usr/local/bin"/>
				<var name="config.dir.local" value="/etc" />
                -->

                <var name="bin.dir.remote" value="${dir.remote}${bin.dir}"/>
                <var name="vmbk-webcfg.sh.exe"  value="${exe.prefix} sh ${bin.dir}/vmbk-webcfg.sh ${config.dir.local}/vmbk.conf"/>
                <!-- <var name="webcfg-modifier.exe" value="${exe.prefix} perl ${bin.dir}/webcfg-filemodifier.pl -i ${config.dir.local}/vmbk.conf -p ${config.dir.local}/vmbk-addon.webcfg"/> -->
        </varset>
        
        <fileset>
            <file id="intro" filename="${template.dir}/intro.txt"
                  type="plain"/>
            <file id="vmbk3_conf" filename="${config.dir.remote}/vmbk.conf"
                  templatefilename="${template.dir}/${version.vmbk}/vmbk-default-webcfg.conf"
                  type="property"/>
            <file id="crontab" filename="${config.dir.remote}/crontab"  tab="Cron"
                  templatefilename="${template.dir}/crontab"
                  type="plain"/>
            <file id="logfile" filename="${config.dir.remote}/vmbk-logfile.webcfg" 
                  templatefilename="${template.dir}/vmbk-logfile.webcfg" 
                  type="plain"/>
            <!-- 
              <file id="addon" filename="${config.dir.remote}/vmbk-addon.webcfg"
	          templatefilename="${template.dir}/vmbk-addon.webcfg"
                  type="property"/>
             --> 

            <!-- copy wrapper to ESX3 -->
            <file id="vmbk_webcfg_sh" filename="${bin.dir.remote}/vmbk-webcfg.sh"
                  templatefilename="${template.dir}/vmbk-webcfg.sh"
                  default-hide="true"  type="raw"/>
             <file id="smtp_send_pl" filename="${bin.dir.remote}/smtp_send.pl"
                  templatefilename="${template.dir}/smtp_send.pl"
                  default-hide="true"  type="raw"/>
			<!-- 
               <file id="webcfg_filemodifier_pl" filename="${bin.dir.remote}/webcfg-filemodifier.pl"
                  templatefilename="${config.dir}/bin/webcfg-filemodifier.pl"
                  default-hide="true"  type="raw"/>
			-->
        </fileset>



        <handlerset>
                <handler id="log" interval="10" format="plain">
                    <action execute="${vmbk-webcfg.sh.exe} show_log" shell="${shell.ssh}"/>
                </handler>
        </handlerset>

         <buttonset>
            <button id="save" displayname="Active configuration"
                    successtext="Save successful..">
                <save/>
            </button>
            
            <button id="modify_view" successtext="If your in in Demo-Mode, this function does not work !"
                displayname="Activate Setup" >
                <save/>
                <action execute="${webcfg-modifier.exe}" shell="${shell.ssh}" reload="true" silent="true"/>
            </button>

            <button id="check_samba"
                displayname="Check samba configuration" >
                <save/>
                <action execute="${vmbk-webcfg.sh.exe} check_samba" shell="${shell.ssh}"/>
            </button>

            <button id="check_nfs"
                displayname="Check NFS configuration" >
                <save/>
                <action execute="${vmbk-webcfg.sh.exe} check_nfs" shell="${shell.ssh}"/>
            </button>

            <button id="check_email"
                displayname="Send test email" >
                <save/>
                <action execute="${vmbk-webcfg.sh.exe} check_email" shell="${shell.ssh}"/>
            </button>

            <button id="man_cron"
                        displayname="Show Manpage for crontab">
                <action execute="${exe.prefix} man 5 crontab" shell="${shell.ssh}" />
             </button>
<!--
            <button id="check_backup"
                displayname="Do nothing. Print what would be backed up" >
                <action execute="${vmbk-webcfg.sh.exe}  check_backup" shell="${shell.ssh}"/>
            </button>

            <button id="do_backup"
                displayname="Create a real backup" >
                <action execute="${vmbk-webcfg.sh.exe} do_backup" shell="${shell.ssh}"/>
            </button>
 -->
        </buttonset>
    </wcapp>


    <!-- =======================================================
          vi3backup - scripts for backup VMware ESX 3.x Server
         ======================================================= -->
    <wcapp id="vi3backup" 
        displayname="DEMO: VMware ESX - vi3backup script for VMWare ESX 3.x"
        header="Configuration of vi3backup"
        adminview="true"
        enable="true"
        authref="esx.ssh.faked">

        <varset>
            <var name="template.dir"          value="${global.template.dir}/vi3backup"/>
            <var name="config.dir.local"  value="${global.config.dir.local}/vi3backup/etc"/>
            <var name="vi3check.exe"          value="${exe.prefix} sh /usr/local/bin/vi3Backup_check.sh ${config.dir.local}/vi3Backup.cfg"/>
        </varset>

        <loadaction execute="${exe.prefix} mkdir -p ${config.dir.local}" shell="${shell}"/>

        <fileset>
	        <file id="vi3Backup_cfg"   
	                  filename="${config.dir.remote}/vi3Backup.cfg"
	                  templatefilename="${template.dir}/vi3Backup-0.43.cfg" 
	                  default-readonly="false"
	                  default-hide="false"
	                  linefeed="auto"
	                  type="property"/>
	        <file id="crontab"               
	                  filename="${config.dir.remote}/crontab" 
	                  templatefilename="${template.dir}/crontab" 
	                  type="plain"/>
	        <file id="exclude"    
	                  filename="${config.dir.remote}/vi3backup.excludelist"
	                  templatefilename="${template.dir}/vi3backup.excludelist"  
	                  type="plain" />
        </fileset>
                
                
        <buttonset>
            <button id="save" 
                    displayname="Active configuration" 
                    scope="global" successtext="Save successful.">
                <save/>
	    </button>

            <button id="check_samba"  scope="local"  
                    displayname="Check samba configuration">
                <save/>
                <action execute="${vi3check.exe} check_samba"
                        shell="${shell}"   reload="false"/>
            </button>
            
            <button id="check_nfs" 
 	            displayname="Check NFS configuration" >
                <save/>
                <action execute="${vi3check.exe} check_nfs"
                        shell="${shell}" />
            </button>
            
            <button id="check_email"   
                    displayname="Send test email">
                <save/>
                <action execute="${vi3check.exe} check_email"
                        shell="${shell}" />
            </button>

            <button id="check_backup"  
                    displayname="Do nothing. Print what would be backed up">
                <save/>
                <action execute="${vi3check.exe} check_backup"      
                        shell="${shell}" />
            </button>

            <button id="do_backup"     
                    displayname="Create a real backup" >
                <save/>
                <action execute="${vi3check.exe} do_backup"
                        shell="${shell}" />
            </button>
            
            <button id="man_cron"      
                    displayname="Show Manpage for crontab">
                <save/>
                <action execute="${exe.prefix} man 5 crontab" 
                        shell="${shell}" />
            </button>

            <button id="show_vmnames"  
                    displayname="Show all virtual machines"> 
                <save/>
                <action execute="${vi3check.exe} show_vmnames"
                        shell="${shell}" />
            </button>
        </buttonset>
    </wcapp>

 
    <!-- ======================================
                    Mail alises
         ====================================== -->
    <wcapp id="mail.aliases" 
            adminview="true"
            displayname="DEMO: MAIL - modify aliases">
        <varset>
            <var name="template.dir" value="${global.template.dir}/mail"/>
            <var name="newaliases.exe" value="${exe.prefix} call e.g. newaliases"/>
        </varset>

        <fileset>
            <file id="aliases" filename="${template.dir}/aliases" />
        </fileset>

        <buttonset>
            <button id="newaliases" displayname="Activate new aliases" scope="global"
                    successtext="Configuration activated."  >
                <save/>
                <action execute="${newaliases.exe}" silent="true" />
            </button>
        </buttonset>
    </wcapp>

        <!-- ======================================
                        Spamassassin
              ====================================== -->
    <wcapp id="mail.spamassassin" authref="spamassasin.ssh.faked" adminview="true"
            displayname="DEMO: Spamassassin whitelist management">

        <varset>

            <var name="template.dir" value="${global.template.dir}/spamassassin"/>

            <!-- Production
                 <var name="config.dir.local" value="/etc/spamassassin"/>
                 <var name="work.dir.local" value="/tmp"/>
            -->

            <!-- Demo -->
            <var name="config.dir.local" value="${template.dir}"/>
            <var name="work.dir.local" value="${template.dir}/tmp"/>

        </varset>

        <fileset>
            <file id="ctrl" type="property" linefeed="unix"
                  filename="${dir.remote}/${work.dir.local}/sa-ctrl.cfg"
                  templatefilename="${template.dir}/sa-ctrl.cfg" />

            <file id="local" tab="Whitelist" type="plain" linefeed="unix"
                  default-hide="false"
                  filename="${config.dir.remote}/local.cf" />

            <file id="manual" tab="Manual" type="plain" linefeed="unix"
                  filename="${config.dir.remote}/manual.txt"
                  templatefilename="${template.dir}/manual.txt"/>

            <file id="sa_ctrl_sh" tab="ctrl" type="plain" linefeed="unix" default-hide="true"
                  filename="${dir.remote}/${work.dir.local}/sa-ctrl.sh"
                  templatefilename="${template.dir}/sa-ctrl.sh" />
        </fileset>

        <buttonset>
            <button id="save" displayname="Activate new configuration" successtext="Configuration saved" >
                <save/>
                <action execute="${exe.prefix} /etc/init.d/spamassassin reload" silent="true"
                        shell="${shell}" />
            </button>

            <button id="add_entry" displayname="Add Entry now" successtext="New entry added">
                <save filename="${dir.remote}${work.dir.local}/${file.name}" />
                <action execute="${exe.prefix} sh ${work.dir.local}/sa-ctrl.sh -c add -f ${work.dir.local}/sa-ctrl.cfg"
                        shell="${shell}"  reload="true"  silent="true"/>
            </button>
        </buttonset>
    </wcapp>


        <!-- ======================================
                        Nagios
              ====================================== -->
    <wcapp id="nagios" adminview="true"
            displayname="DEMO: Nagios tiny frontend">

                <varset>
                    <var name="config.dir.local" value="${global.template.dir}/nagios"/>
                </varset>

                <fileset>
                        <file id="info" type="plain" linefeed="unix"
                              filename="${config.dir.remote}/info.txt" />
                </fileset>

        <buttonset>
            <button id="nagios_restart" displayname="Restart" successtext="Nagios restarted" >
                <action execute="${exe.prefix} echo restart now-script (e.g. /etc/init.d/nagios restart"
                        shell="${shell}" silent="true" />
            </button>
        </buttonset>
    </wcapp>

    <!-- ======================================
           Vacation with cyrus and sieve
         ====================================== -->
    <wcapp id="mail.vacation.sieve" enable="true"
        adminview="true" style="example1"
        displayname="DEMO: Vacation mail setup (cyrus+sieve)"
        authref="kolab2.imap.faked">

        <varset>
                <var name="script.dir" value="${global.template.dir}/vacation"/>
                <var name="template.dir" value="${global.template.dir}/vacation/english"/>
                <var name="config.dir.local" value="${global.config.dir.local}/vacation-sieve/srv/webcfg/${config.username}/vacation-sieve.english"/>
                <var name="vacation.exe" value="${exe.prefix} sh ${script.dir}/vacation.sh -f ${config.dir.local}/vacation.conf"/>
        </varset>

        <loadaction execute="${vacation.exe} -f ${config.dir.local}/vacation.conf -c prepare -u ${config.username}"/>
        <fileset>
            <file id="config" type="property" linefeed="unix"       
                      filename="${config.dir.local}/vacation.conf" 
                      templatefilename="${template.dir}/vacation.conf"/>
            <file id="message" type="plain" linefeed="unix"             
                      filename="${config.dir.local}/vacation.msg" 
                      templatefilename="${template.dir}/vacation.msg"/>
            <file id="exclude" type="plain" linefeed="unix"             
                      filename="${config.dir.local}/vacation.exclude" 
                      templatefilename="${template.dir}/vacation.exclude"/>
            <file id="plugin" type="property" linefeed="unix"                     
                      filename="${config.dir.local}/vacation-plugin.conf" 
                      templatefilename="${template.dir}/vacation-sieve.conf"/>
	        <file id="sieve" type="raw" linefeed="unix"     tab="Sieve"    
	              filename="${config.dir.local}/sieve.script"
	              templatefilename="${template.dir}/sieve.script"/>
        </fileset>

        <buttonset>
            <button id="global" displayname="Active Setup" scope="global"
                    successtext="Configuration activated." >
                 <save/>
                 <action execute="${vacation.exe} -c process -u ${config.username} -p ${config.password}" 
                         silent="true" />
            </button>
            <button id="get_sieve" displayname="Get script">
                    <action execute="${vacation.exe} -c get_sieve -u ${config.username} -p ${config.password}"/>
            </button>
            <button id="do_list" displayname="Show emailadresses">
                    <action execute="${vacation.exe} -c list"/>
            </button>
            <button id="list_jobs" displayname="List jobs">
                    <action execute="${vacation.exe} -c list_jobs"/>
            </button>
            <button id="do_test" displayname="Test vacation">
                    <save/>
                    <action execute="${vacation.exe} -c test"/>
            </button>
        </buttonset>
    </wcapp>

    <!-- ======================================
           Vacation with cyrus and sieve, German
         ====================================== -->
    <wcapp id="mail.vacation.sieve.de" enable="true"
        adminview="true" style="example1"
        displayname="DEMO: Vacation mail setup (cyrus+sieve, German)"
        authref="kolab2.imap.faked">

        <varset>
                <var name="script.dir" value="${global.template.dir}/vacation"/>
                <var name="template.dir" value="${global.template.dir}/vacation/german"/>
                <var name="config.dir.local" value="${global.config.dir.local}/vacation-sieve/srv/webcfg/${config.username}/vacation-sieve.german"/>
                <var name="vacation.exe" value="${exe.prefix} sh ${script.dir}/vacation.sh -f ${config.dir.local}/vacation.conf"/>
        </varset>

        <loadaction execute="${vacation.exe} -f ${config.dir.local}/vacation.conf -c prepare -u ${config.username}"/>
        <fileset>
            <file id="config" type="property" linefeed="unix"       
                      filename="${config.dir.local}/vacation.conf" 
                      templatefilename="${template.dir}/vacation.conf"/>
            <file id="message" type="plain" linefeed="unix"             
                      filename="${config.dir.local}/vacation.msg" 
                      templatefilename="${template.dir}/vacation.msg"/>
            <file id="exclude" type="plain" linefeed="unix"             
                      filename="${config.dir.local}/vacation.exclude" 
                      templatefilename="${template.dir}/vacation.exclude"/>
            <file id="plugin" type="property" linefeed="unix"                     
                      filename="${config.dir.local}/vacation-plugin.conf" 
                      templatefilename="${template.dir}/vacation-sieve.conf"/>
	        <file id="sieve" type="raw" linefeed="unix"     tab="Sieve"    
	              filename="${config.dir.local}/sieve.script"
	              templatefilename="${template.dir}/sieve.script"/>
        </fileset>

        <buttonset>
            <button id="global" displayname="Active Setup" scope="global"
                    successtext="Configuration activated." >
                 <save/>
                 <action execute="${vacation.exe} -c process -u ${config.username} -p ${config.password}" 
                         silent="true" />
            </button>
            <button id="get_sieve" displayname="Get script">
                    <action execute="${vacation.exe} -c get_sieve -u ${config.username} -p ${config.password}"/>
            </button>
            <button id="do_list" displayname="Show emailadresses">
                    <action execute="${vacation.exe} -c list"/>
            </button>
            <button id="list_jobs" displayname="List jobs">
                    <action execute="${vacation.exe} -c list_jobs"/>
            </button>
            <button id="do_test" displayname="Test vacation">
                    <save/>
                    <action execute="${vacation.exe} -c test"/>
            </button>
        </buttonset>
    </wcapp>


    <!-- ======================================
            Vacation with local delivery 
            (forward and vacation)
         ====================================== -->
    <wcapp id="mail.vacation.local"
            adminview="true"  style="example1"
            displayname="DEMO: Vacation mail setup (local, forward+vacation)"
            authref="multi.ssh.faked">

        <varset>
                <var name="script.dir" value="${global.template.dir}/vacation"/>
                <var name="template.dir" value="${global.template.dir}/vacation/english"/>
                <var name="config.dir.local" value="${global.config.dir.local}/home/${config.username}/.webcfg/vacation-local.english"/>
                <var name="vacation.exe" value="${exe.prefix} sh ${script.dir}/vacation.sh -f ${config.dir.local}/vacation.conf"/>
        </varset>

        <loadaction execute="${vacation.exe} -f ${config.dir.local}/vacation.conf -c prepare -u ${config.username}"
                                 shell="${shell.ssh}" /> 
        <fileset>
            <file id="config" type="property" linefeed="unix"               
                      filename="${config.dir.remote}/vacation.conf" 
                      templatefilename="${template.dir}/vacation.conf"/>
            <file id="message" type="plain" linefeed="unix"                    
                      filename="${config.dir.remote}/vacation.msg" 
                      templatefilename="${template.dir}/vacation.msg"/>
            <file id="exclude" type="plain" linefeed="unix"                 
                      filename="${config.dir.remote}/vacation.exclude" 
                      templatefilename="${template.dir}/vacation.exclude"/>
            <file id="plugin" type="property" linefeed="unix"                     
                      filename="${config.dir.remote}/vacation-plugin.conf" 
                      templatefilename="${template.dir}/vacation-local.conf"/>
        </fileset>

        <buttonset>
            <button id="save" displayname="Activate configuration" scope="global">
                 <save/>
                 <action execute="${vacation.exe} -c process -u ${config.username} -p ${config.password}" 
                         shell="${shell}" reload="true" /> 
            </button>
            <button id="do_list"      displayname="Show emailadresses">
	        <action  execute="${vacation.exe} -c list"
                         shell="${shell}" /> 
            </button>
            <button id="list_jobs" displayname="List jobs">
                <action execute="${vacation.exe} -c list_jobs"
                        shell="${shell}" /> 
            </button>
            <button id="do_test"  displayname="Test vacation">
                <save/>
                <action  execute="${vacation.exe} -c test"
                         shell="${shell}" /> 
            </button>
        </buttonset>
    </wcapp>

    <!-- ======================================
            Vacation with local delivery 
            (forward and vacation) - German
         ====================================== -->
    <wcapp id="mail.vacation.local.de"
            adminview="true"  style="example1"
            displayname="DEMO: Vacation mail setup (local, forward+vacation, German)"
            authref="multi.ssh.faked">

        <varset>
                <var name="script.dir" value="${global.template.dir}/vacation"/>
                <var name="template.dir" value="${global.template.dir}/vacation/german"/>
                <var name="config.dir.local" value="${global.config.dir.local}/home/${config.username}/.webcfg/vacation-local.german"/>
                <var name="vacation.exe" value="${exe.prefix} sh ${script.dir}/vacation.sh -f ${config.dir.local}/vacation.conf"/>
        </varset>

        <loadaction execute="${vacation.exe} -f ${config.dir.local}/vacation.conf -c prepare -u ${config.username}"
                                 shell="${shell.ssh}" /> 
        <fileset>
            <file id="config" type="property" linefeed="unix"               
                      filename="${config.dir.remote}/vacation.conf" 
                      templatefilename="${template.dir}/vacation.conf"/>
            <file id="message" type="plain" linefeed="unix"                    
                      filename="${config.dir.remote}/vacation.msg" 
                      templatefilename="${template.dir}/vacation.msg"/>
            <file id="exclude" type="plain" linefeed="unix"                 
                      filename="${config.dir.remote}/vacation.exclude" 
                      templatefilename="${template.dir}/vacation.exclude"/>
            <file id="plugin" type="property" linefeed="unix"                     
                      filename="${config.dir.remote}/vacation-plugin.conf" 
                      templatefilename="${template.dir}/vacation-local.conf"/>
        </fileset>

        <buttonset>
            <button id="save" displayname="Activate configuration" scope="global">
                 <save/>
                 <action execute="${vacation.exe} -c process -u ${config.username} -p ${config.password}" 
                         shell="${shell}" reload="true" /> 
            </button>
            <button id="do_list"      displayname="Show emailadresses">
	        <action  execute="${vacation.exe} -c list"
                         shell="${shell}" /> 
            </button>
            <button id="list_jobs" displayname="List jobs">
                <action execute="${vacation.exe} -c list_jobs"
                        shell="${shell}" /> 
            </button>
            <button id="do_test"  displayname="Test vacation">
                <save/>
                <action  execute="${vacation.exe} -c test"
                         shell="${shell}" /> 
            </button>
        </buttonset>
    </wcapp>

    <!-- ======================================
                    Amanda 
         ====================================== -->
    <wcapp id="amanda.disklist"
            displayname="DEMO: Amanda Backup - Disklist"
            style="amanda.org"
            authref="guest">

        <varset>
            <var name="template.dir" value="${global.template.dir}/amanda"/>
            <var name="check.exe" value="${exe.prefix} call a script for "/>
        </varset>

        <fileset>
            <file id="disklist"  filename="${template.dir}/disklist"/>
        </fileset>

        <buttonset>
            <button id="check_amanda"
                    displayname="Check config">
                    <action execute="${check.exe} checking your configuration"/>
            </button>
            <button id="flush"
                    displayname="Flush now">
                    <action execute="${check.exe} flushing fileset (amflush)"/>
            </button>

            <button id="showNextTape"
                    displayname="Show tape for next backup">
                    <action execute="${check.exe} display tapelist (e.g. tail -1 /path/to/tapelist)"/>
            </button>
            <button id="eject" successtext="Tape ejected."
                    displayname="Eject Tape">
                    <action execute="${check.exe} eject the tape (e.g. 'mt eject')" silent="true"/>
            </button>
        </buttonset>
    </wcapp>


    <!-- ======================================
              Domain DNS managment (1)
         ====================================== -->
    <wcapp id="dns1"
            displayname="DEMO: DNS - Display DNS zones (per area)">

        <varset>
            <var name="template.dir" value="${global.template.dir}/dns1"/>
            <var name="update_dns.exe" value="${exe.prefix} sh ${template.dir}/update_dns.sh ${template.dir}"/>
        </varset>

        <fileset>
            <file id="domain" 
                      filename="${template.dir}/domain.com" />
            <file id="zone_192_168_1_rev" 
                      filename="${template.dir}/192.168.1.rev" />
            <file id="config" type="property" tab="Setup"  
                      filename="${template.dir}/update_dns.conf" />
            <file id="manual" type="property" tab="Manual"
                      filename="${template.dir}/manual.txt" />
        </fileset>
                
        <buttonset>
            <button id="check" displayname="Active DNS configuration" scope="global"
                    successtext="DNS setup activated.">
                 <save filename="${file.filename}.webcfg" />
                 <action execute="${update_dns.exe}" silent="true" 
                         reload="true"/> 
            </button>
        </buttonset>

    </wcapp>

    <!-- ======================================
               Domain DNS managment (2)
         ====================================== -->
    <wcapp id="dns2"
            displayname="DEMO: DNS - Display DNS zones (per zone)">

        <varset>
            <var name="template.dir" value="${global.template.dir}/dns2"/>
            <var name="update_dns.exe" value="${exe.prefix} sh ${global.template.dir}/dns1/update_dns.sh ${template.dir}"/>
        </varset>

        <fileset>
            <file id="domain" tab="domain.com" type="raw"
                      filename="${template.dir}/domain.com" />
            <file id="zone_1_rev" tab="192.168.1.0/24" type="raw"
                      filename="${template.dir}/192.168.1.rev" />
            <file id="config" type="property" tab="Setup"  
                      filename="${global.template.dir}/dns1/update_dns.conf" />
            <file id="manual" type="property" tab="Manual"
                      filename="${global.template.dir}/dns1/manual.txt" />
        </fileset>

        <buttonset>
            <button id="check" displayname="Active DNS configuration" scope="global"
                    successtext="DNS setup activated.">
                 <save filename="${file.filename}.webcfg" />
                 <action execute="${update_dns.exe}" silent="true" 
                             reload="true"/> 
            </button>
        </buttonset>

    </wcapp>

    <!-- ======================================
                    survey (english)
         ====================================== -->
    <wcapp id="survey.feedback1"   adminview="true"
            displayname="DEMO: Survey">
                
        <varset>
            <var name="template.dir" value="${global.template.dir}/survey"/>
        </varset>

        <fileset>
   	        <file id="survey" 
	              filename="${template.dir}/feedback-en.txt" 
	              type="property" />
   	        <file id="comment" 
	              filename="${template.dir}/comment-en.txt" 
	              type="plain" />
        </fileset>

        <buttonset>
            <button id="check" displayname="Send survey now" scope="global"
                    successtext="Thank you for your feedback.">
                 <save filename="${file.filename}-${web.session.id}.txt" />
            </button>
        </buttonset>

    </wcapp>


 
   <!-- ======================================
                    survey (german)
         ====================================== -->
    <wcapp id="survey.feedback1.de"  adminview="true"
            displayname="DEMO: Meinungsumfrage / Feedbackformular (German)">
                
        <varset>
            <var name="template.dir" value="${global.template.dir}/survey"/>
        </varset>

        <fileset>
   	        <file id="survey" 
	              filename="${template.dir}/feedback-de.txt" 
	              type="property" />
   	        <file id="comment" 
	              filename="${template.dir}/comment-de.txt" 
	              type="plain" />
        </fileset>

        <buttonset>
            <button id="check" displayname="Sende Feedback" scope="global"
                    successtext="Danke fuer Ihren Feedback.">
                 <save filename="${file.filename}-${web.session.id}.txt" />
            </button>
        </buttonset>

    </wcapp>

   <!-- ======================================
                    external datasource
         ====================================== -->
    <wcapp id="datasource"  adminview="true"
            displayname="DEMO: Integration of external datasources">
                
        <varset>
            <var name="template.dir" value="${global.template.dir}/datasource"/>
            <var name="action1" value="${sh} ${template.dir}/myhandler.${exe.suffix}"/>
        </varset>

        <handlerset>
            <handler  id="handler1" interval="1" format="plain">
                <action execute="${action1}"/>
            </handler>
            <handler  id="handler5" interval="5" format="plain">
                <action execute="${action1}"/>
            </handler>
            <handler  id="handler10" interval="10" format="plain">
                <action execute="${action1}"/>
            </handler>
        </handlerset>

        <fileset>
   	        <file id="external" filename="${template.dir}/externaldata-gui.txt" 
	              type="property" />
        </fileset>

    </wcapp>

   <!-- ======================================
                    DRBD Frontend
         ====================================== -->
    <wcapp  id="drbd" displayname="DEMO: DRBD Network mirroring" 
            header="Managementinterface for DRBD" 
            authref="nas.ssh.faked" >

        <varset>
            <var name="template.dir" value="${global.template.dir}/drbd"/>
            <var name="configdir.local" value="${template.dir}/data"/>

	        <var name="drbd.dir" value="${global.template.dir}/drbd"/>
    	    <var name="drbd-ctrl.exe" value="${exe.prefix} ${sh} ${drbd.dir}/drbd-webcfg.sh" />
        </varset>

        <handlerset>
                <handler id="h1" interval="5" format="property" >
                        <action execute="${drbd-ctrl.exe} -c status"  shell="${shell.ssh}"/>
                </handler>
                <handler  id="h_proc_status" interval="5" format="plain" >
                        <action execute="${drbd-ctrl.exe} -c status_proc"  shell="${shell.ssh}"/>
                </handler>
                <handler  id="h_logfile_ha_debug" interval="5" format="plain" >
                        <action execute="${drbd-ctrl.exe} -c logfiles"  shell="${shell.ssh}"/>
                </handler>
        </handlerset>

        <fileset>
                <file id="header" tab="General"
                      filename="${template.dir}/header.txt" type="property"/>

                <file id="commandfile" tab="State"
                      filename="${configdir.local}/SOULD_NOT_EXIST__DELETE_IT.drbd-webcfg-commandfile"
                      templatefilename="${template.dir}/drbd-webcfg-commandfile.template" type="property" />

                <file id="proc2" tab="ProcState"
                      filename="${configdir.local}/SOULD_NOT_EXIST__DELETE_IT.drbd-status-proc.txt"
                      templatefilename="${template.dir}/drbd-status-proc.template" type="plain" />

<!--                <file name="logfile" tab="Logfiles"
                      filename="${configdir.local}/SOULD_NOT_EXIST__DELETE_IT.logfiles.txt"
                      templatefilename="${template.dir}/logfiles.template" type="plain" />
-->

                <file id="intro" 
                      filename="${template.dir}/intro.txt" type="plain" />
        </fileset>

        <buttonset>
            <button id="drbdadm_cmd" displayname="Change state"
                    successtext="Action executed successfully.">
                 <save filename="${configdir.remote}/${file.name}.tmp"/>
                 <action execute="${drbd-ctrl.exe} -c commandfile"  reload="true" 
                        silent="true" shell="${shell.ssh}"/>
                 <confirm message="Do you really want to perform all selected actions?" 
                          type="question" />
            </button>

            <button id="drbdadm_cmd_verbose" displayname="Change state."
                    successtext="Action executed successfully.">
                 <save filename="${configdir.remote}/${file.name}.tmp"/>
                 <action execute="${drbd-ctrl.exe} -c commandfile"  reload="true" 
                         silent="false" popup="false" shell="${shell.ssh}"/>
                 <confirm message="Do you really want to perform all selected actions?" 
                          type="question" />
            </button>

<!--
            <button name="logfile" displayname="Show Logfile">
                 <save filename="${configdir.remote}/${file.name}.tmp"/>
                 <action execute="${drbd-ctrl.exe} -c logfiles"  reload="true" 
                        silent="false" popup="false" shell="${shell.ssh}"/>
            </button>
-->
        </buttonset>
    </wcapp>

    <!-- ======================================
				create new user
         ====================================== -->
    <wcapp id="CreateNewUser" adminview="true" authref="ad.ldap.fake"
        displayname="DEMO: Create a new microsoft windows active directory user">
        <varset>
            <var name="template.dir" value="${global.template.dir}/CreateUserAD"/>

            <var name="newuser.exe" value="${exe.prefix} cscript //B //NoLogo //T:20 ${template.dir}/createProjectUser.vbs -f ${commandfile} -u ${config.username} "/>
            <var name="list" value="${template.dir}/list.tmp"/>
            <var name="commandfile" value="${template.dir}/commandfile-english.txt"/>
        </varset>

        <fileset>
            <file id="cmdfile" filename="${commandfile}" type="property"/>
            <file id="listfile" filename="${list}" templatefilename="${template.dir}/list.template"
            	  type="plain" tab="Userlist" />
        </fileset>

        <buttonset>
            <button id="create" displayname="Create user"   successtext="Operation successfull.">
                <action  execute="${newuser.exe} -a create"  popup="false" silent="true"/>
	        <confirm type="question" message="Do you want to create a new user?"/>
	        <save/>
	    </button>

            <button id="delete" displayname="Delete user"   successtext="Operation successfull.">
                <action  execute="${newuser.exe} -a delete"  popup="false" silent="true"/>
	        <confirm type="question" message="Do you want to delete this user?"/>
	        <save/>
	    </button>

            <button id="change" displayname="Change user"   successtext="Operation successfull.">
                <action  execute="${newuser.exe} -a change"  popup="false" silent="true"/>
	        <confirm type="question" message="Do you want to modify this user ?"/>
	        <save/>
	    </button>

            <button id="list" displayname="Reload userlist"  successtext="List reloaded successfully.">
                <action  execute="${newuser.exe} -a list"  silent="true" popup="false" reload="true"/>
	    </button>

        </buttonset>

    </wcapp>

    <!-- ======================================
                    webcfg configuration 
         ====================================== -->
    <wcapp id="webcfg"
            displayname="WebCFG - webcfg.xml example for this demo">

        <varset>
            <var name="template.dir" value="${global.template.dir}/xsd-doc" />
        </varset>
         
        <fileset>
   	        <file id="master" filename="${template.dir}/doc.txt" 
	              default-readonly="true" />
        </fileset>
    </wcapp>

</webcfg>