Administration Guide > Basic TDV Administration Tasks > Starting TDV Processes on UNIX > Customizing the TDV Server Startup Scripts on UNIX
 
Customizing the TDV Server Startup Scripts on UNIX
The TDV installation provides a startup script for UNIX that you can customize for your own purpose; but to maintain customizations you might have made to this script across hotfix or patch updates, you must activate an environment variable.
You can also use this functionality to add JRE VM arguments or run commands automatically before launching TDV.
The procedure below describes how to configure the startup script for UNIX.
To configure the TDV startup scripts for UNIX
1. Stop the TDV Server.
2. Navigate to conf under the TDV installation directory.
cd <TDV_install_dir>/conf
 
3. Copy script_env.sh.sample to script_env.sh.
4. Open script_env.sh with a text editor and uncomment the last two lines:
# CIS_SERVER_VM_ARGS=
# export CIS_SERVER_VM_ARGS
 
5. Change the value of CIS_SERVER_VM_ARGS to include all the values in VM_ARGS from <TDV_install_dir>/bin/composite_server.sh.
a. Retrieve the platform-specific value of VM_ARGS from <TDV_install_dir>/bin/composite_server.sh. Locate the line for your platform:
SunOS and Linux platforms should use the VM_ARGS definition on the "Linux"|"SunOS" line.
AIX platform should use the VM_ARGS definition on the "AIX" line.
b. Make sure you add double-quotes around the value specified for CIS_SERVER_VM_ARGS.
c. If you want to run an executable or command-line utility at this point, make sure the command returns control to composite_server.sh. If it does not, TDV does not start correctly.
Each command you add should be on a new line.
6. Start the TDV Server.
7. Check the end of the newest <TDV_install_dir>/logs/cs_server.out.<timestamp> file to ensure the script environment functionality is working.
In the following example of a cs_server.out.<timestamp> file, script_env.sh added a new JRE VM option "-Dtest=false" and ran script commands to print the contents of a directory.
The output shows you the “before” and “after” VM_ARGS settings so you can see what is being used in TDV.
> Tue Mar 20 08:19:01 PDT 2012
> Detected /opt/<installdir>/conf/script_env.sh, sourcing it...
>
> ls logs
> cluster
> cs_server.out.20120320081901
>
> Done sourcing /opt/<installdir>/conf/script_env.sh
> Default VM_ARGS: -server -XX:NewRatio=6 -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/<installdir>/logs -XX:PermSize=64m -XX:MaxPermSize=256m -XX:-ReduceInitialCardMarks -XX:+ExplicitGCInvokesConcurrent -XX:+UseConcMarkSweepGC
> Detected CIS_SERVER_VM_ARGS environment variable overrides VM_ARGS
> Changing VM_ARGS to: -server -XX:NewRatio=6 -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/<installdir>logs -XX:PermSize=64m -XX:MaxPermSize=256m -XX:-ReduceInitialCardMarks -XX:+ExplicitGCInvokesConcurrent -XX:+UseConcMarkSweepGC -Dtest=false
> chmod 755 "/opt/<installdir>/bin/init_patch_script.sh" exit code=0
> "/opt/<installdir>/bin/init_patch_script.sh"
> "/opt/<installdir>" "/opt/<installdir>" exit code=0
> Starting the TDV Server process