###############################################################################
#
# Open iT Patch definition
#

# Stop reporting server
stop
{
	error=warning
	module=reportingserver
}

# Stop server
stop
{
	error=warning
	module=server
}

# Wait for all previously signalled programs to stop
waitstop
{
	error=fatal
	timeout=60
	kill=no
}

install
{
	error=error
	source=bin/openit_archiver.exe
	target=%installdir%/bin/openit_archiver.exe
}

install
{
	error=error
	source=bin/openit_jobscheduler.exe
	target=%installdir%/bin/openit_jobscheduler.exe
}

install
{
	error=error
	source=bin/openit_licensestatusconverter.exe
	target=%installdir%/bin/openit_licensestatusconverter.exe
}

install
{
	error=error
	source=bin/openit_flab.exe
	target=%installdir%/bin/openit_flab.exe
}

install
{
	error=error
	source=bin/openit_licpollarchivefilesplitter.exe
	target=%installdir%/bin/openit_licpollarchivefilesplitter.exe
}

install
{
	error=error
	source=bin/openit_filtrator.exe
	target=%installdir%/bin/openit_filtrator.exe
}

install
{
	error=error
	source=bin/openit_scheduler.exe
	target=%installdir%/bin/openit_scheduler.exe
}

install
{
	error=error
	source=bin/openit_clcconfig.exe
	target=%installdir%/bin/openit_clcconfig.exe
}

install
{
	error=error
	source=bin/openit_clhandlescanner.exe
	target=%installdir%/bin/openit_clhandlescanner.exe
}

install
{
	error=error
	source=bin/openit_pollcollector.exe
	target=%installdir%/bin/openit_pollcollector.exe
}


install
{
	error=error
	source=bin/openit_scheduler.exe.sign
	target=%installdir%/bin/openit_scheduler.exe.sign
}

install
{
	error=error
	source=bin/openit_comcenter.exe.sign
	target=%installdir%/bin/openit_comcenter.exe.sign
}

install
{
	error=error
	source=bin/openit_datafilesender.exe.sign
	target=%installdir%/bin/openit_datafilesender.exe.sign
}

install
{
	error=error
	source=bin/openit_flexremove.exe.sign
	target=%installdir%/bin/openit_flexremove.exe.sign
}

install
{
	error=error
	source=bin/openit_indexer.exe.sign
	target=%installdir%/bin/openit_indexer.exe.sign
}

install
{
	error=error
	source=bin/openit_messagerouter.exe.sign
	target=%installdir%/bin/openit_messagerouter.exe.sign
}

install
{
	error=error
	source=bin/openit_minimizer.exe.sign
	target=%installdir%/bin/openit_minimizer.exe.sign
}

install
{
	error=error
	source=bin/openit_networkmaster.exe.sign
	target=%installdir%/bin/openit_networkmaster.exe.sign
}

install
{
	error=error
	source=bin/openit_notificationcenter.exe.sign
	target=%installdir%/bin/openit_notificationcenter.exe.sign
}

install
{
	error=error
	source=bin/openit_zmqconsole.exe.sign
	target=%installdir%/bin/openit_zmqconsole.exe.sign
}

install
{
	error=error
	source=bin/openit_clcconfig.exe.sign
	target=%installdir%/bin/openit_clcconfig.exe.sign
}

install
{
	error=error
	source=bin/openit_clhandlescanner.exe.sign
	target=%installdir%/bin/openit_clhandlescanner.exe.sign
}

install
{
	error=error
	source=bin/openit_pollcollector.exe.sign
	target=%installdir%/bin/openit_pollcollector.exe.sign
}


install
{
	error=error
	source=bin/regenerate_data.pl
	target=%installdir%/bin/regenerate_data.pl
}

install
{
	error=error
	source=conf/ConfBuilder-la-auto.conf
	target=%confdir%/ConfBuilder-la-auto.conf
}

install
{
	error=error
	source=conf/daemon.exclude
	target=%confdir%/daemon.exclude
}

install
{
	error=error
	source=conf/data_generation_config
	target=%confdir%/data_generation_config
}

install
{
	error=error
	source=conf/license_analyzer.oconf
	target=%confdir%/module-activation/license_analyzer.oconf
}

#jobscheduler and data loading fix.

install
{
	error=error
	source=perl/DataTypes.pm
	target=%installdir%/lib/OpeniT/DataTypes.pm
}

install
{
	error=error
	source=perl/File.pm
	target=%installdir%/lib/OpeniT/File.pm
}

install
{
	error=error
	source=bin/do_load.pl
	target=%installdir%/bin/do_load.pl
}

install
{
	error=error
	source=bin/add.pl
	target=%installdir%/bin/add.pl
}


confcopy
{
	error=warning
	source=conf/license_analyzer.xml
	target=%confdir%/Components/distreplace.xml
	source-path=DCML.license_analyzer_oconf
	target-path=DCML.distreplace
	replace=yes
}


#change backward slashes to forward slashes in distreplace
confset
{
	error=warning
	target=%confdir%/Components/distreplace.xml
	path=DCML.distreplace.license_optimizer_oconf.Server_Filename
	value=module-activation/license_optimizer.oconf
}

confset
{
	error=warning
	target=%confdir%/Components/distreplace.xml
	path=DCML.distreplace.license_optimizer_oconf.Client_Filename
	value=module-activation/license_optimizer.oconf
}


confset
{
	error=warning
	target=%confdir%/Components/distreplace.xml
	path=DCML.distreplace.storage_analyzer_oconf.Server_Filename
	value=module-activation/storage_analyzer.oconf
}

confset
{
	error=warning
	target=%confdir%/Components/distreplace.xml
	path=DCML.distreplace.storage_analyzer_oconf.Client_Filename
	value=module-activation/storage_analyzer.oconf
}


confset
{
	error=warning
	target=%confdir%/Components/distreplace.xml
	path=DCML.distreplace.system_analyzer_oconf.Server_Filename
	value=module-activation/system_analyzer.oconf
}

confset
{
	error=warning
	target=%confdir%/Components/distreplace.xml
	path=DCML.distreplace.system_analyzer_oconf.Client_Filename
	value=module-activation/system_analyzer.oconf
}

# Install PHP files
installfromdir
{
	error=fatal
	source=web/php/
	target=%installdir%/ReportingServer/
}

# Install Perl files
installfromdir
{
	error=fatal
	source=web/lib
	target=%installdir%/lib/
}


# Start server
start
{
	error=warning
	module=server
}

# Start reportingserver
start
{
	error=warning
	module=reportingserver
}