#!/bin/sh
#  $Id: UpgradeFrom_330923.sh,v 1.3 2005/01/06 16:35:35 peterc Exp $
#  Copyright (C) 2004-2005 Tarantella, Inc.
#  This software code contains proprietary information 
#  and should be treated as confidential.
#
#  Component: Installation/upgrade
#  Author: Bill Weir

FROM_VERSION=330923 TO_VERSION=340911

. ./util

the_edit=""

###
# stuff goes here
###

# Fitz 604263:1 
# Add the property for RDPLicensePoolPersisterService
do_edit "--tarantella-config-components-rdplicensepoolpersisterservice 1"

# Routing changes - fitz 604368:1
do_edit "--tarantella-config-server-netservice-names proxy"
do_edit "--tarantella-config-server-netservice-proxy-bindaddresses %%EXTERNALHOST%%:%%EXTERNALPORT%%:,%%EXTERNALHOST%%:%%SECUREPORT%%:SSL"
do_edit "--tarantella-config-array-netservice-proxy-routes"
do_edit "--tarantella-config-server-netservice-proxy-externalnames *:`get_value --tarantella-config-server-dns-external`" 

##
edit_if_value_is "--tarantella-config-server-logfilter" "*/*/*error:jserver%%PID%%_error.log,*/*/*error:jserver%%PID%%_error.jsl,*/*/fatalerror:.../_beans/com.sco.tta.server.log.ConsoleSink" "*/*/*error:jserver%%PID%%_error.log */*/*error:jserver%%PID%%_error.jsl */*/fatalerror:.../_beans/com.sco.tta.server.log.ConsoleSink */*/warningerror:.../_beans/com.sco.tta.server.log.ConsoleSink"

do_edit "--tarantella-config-server-security-ttauser root"
do_edit "--tarantella-config-scottaxapplication-scottapaletteanimation 0"
do_edit "--tarantella-config-scottacharacterapplication-scottamaxinstances 1"
do_edit "--tarantella-config-scottaxapplication-scottamaxinstances 1"
do_edit "--tarantella-config-array-unauthenticatedsessiontimeout 600"
do_edit "--tarantella-config-array-restartconnectiontimeout 1200"
do_edit "--tarantella-config-array-maxeventsregistered 20"
do_edit "--tarantella-config-server-maxunauthenticatedsessions 100"
do_edit "--tarantella-config-array-allowsessionjoin 1"
do_edit "--tarantella-config-array-useskidauth 1"
do_edit "--tarantella-config-array-limittowebtoplaunches 1"
do_edit "--tarantella-config-components-thirdpartyloginauthority 0"
do_edit "--tarantella-config-array-sessionjoincookietimeout 1"
do_edit "--tarantella-config-server-serversidepermanentconnection 1"
do_edit "--tarantella-config-server-failclientidbeforetimestamp 0"
do_edit "--tarantella-config-server-soapworkerpoolconfig session/sendBatchRequest:7 session:7 webtop:7 emulatorsession/create#emulatorsession/resume:7 emulatorsession:7 print:7 event:7 array#configuration#datastore#listsessions#status:7"
do_edit "--tarantella-config-scottaxapplication-scottaforce3buttonmouse 0"
do_edit "--tarantella-config-printing-mapclientprinters 2"
do_edit "--tarantella-config-printing-pdfenabled 1"
do_edit "--tarantella-config-printing-pdfprinter \\\"Universal PDF\\\""
do_edit "--tarantella-config-printing-pdfdriver \\\"HP Color LaserJet 8500 PS\\\""
do_edit "--tarantella-config-printing-pdfprompt 0"
do_edit "--tarantella-config-printing-pdfisdefault 0"
## concludes TTA_3_30_923 to TTA_4_00_209 diff of config.at.desc

##
edit_if_value_is "--tarantella-config-xpeconfig-keymapfile" "Default" "lang"
edit_if_value_is "--tarantella-config-server-bindaddresses-external" "*,%%EXTERNALHOST%%" "*"
# don't change --tarantella-config-array-privilegeduser
edit_if_value_is "--tarantella-config-applaunch-sessions-aipkeepalive" "300" "100"
edit_if_value_is "--tarantella-config-array-netservice-proxy-routes" "*:CTTCP:" ""
do_edit "--tarantella-config-server-netservice-proxy-externalnames"
do_edit "--tarantella-config-login-thirdparty-allowadmins 0"
do_edit "--tarantella-config-login-thirdparty-allownonens 1"
do_edit "--tarantella-config-server-soapfaultdetails 1"
## concludes -r TTA_4_00_209 -r TTA_4_00_313 

##
do_edit "--tarantella-config-ldap-thirdpartyldapcandidate-useprofile 0"
do_edit "--tarantella-config-ldap-thirdpartyldapcandidate-useens 0"
do_edit "--tarantella-config-login-thirdparty-searchens 1"
## concludes -r TTA_4_00_313 -r TTA_3_40_805

## Final do_edit to commit all changes. this must be after all other calls
## to do_edit, so leaving it last is safest
do_edit

change_all "%%EXTERNALHOST%%" `get_value --tarantella-config-server-dns-external` 

# fitz/  remove all references to webapplications
. $instdir/var/javaenv
. $instdir/bin/scripts/javaprops

exec $jrecommand $TTAJIT $RUNTIME_ARGS -classpath $CLASSPATH $RUNTIME_ARGS \
$JAVA_SYSTEM_PROPERTIES $TTA_USER_CMD  \
-Djava.naming.tfn.flavour=disconnected-local-master \
-Djava.naming.forceLocal=true \
com.sco.tta.common.jndi.provider.diskens.Upgrade3dot3ENS INSTALLDIR=$instdir

exit 0
