release
[tango-nonfree.git] / lib / java / astor.in
blob0494cca1eaaf3c4444b4133c33381e3c4b003b80
1 #!@SHELL@
2 #---------------------------------------------------------
3 #       
4 #---------------------------------------------------------
6 if [ ! $TANGO_HOST ] && [ -f @TANGO_RC_FILE@ ]; then
7    . @TANGO_RC_FILE@
8 fi
10 #---------------------------------------------------------
11 #       Check $DISPLAY variable
12 #---------------------------------------------------------
13 if [ $DISPLAY ]
14 then
15         echo "Display is $DISPLAY"
16 else
17         echo ""
18         echo "DISPLAY environment variable is not defined !"
19         echo "Please, enter your DISPLAY name."
20         read answer
21         if [ $answer ]
22         then
23 #               get the end of string to know if ":0" has been set
24                 start=`expr $answer : '.*:' \| $answer`
25                 echo "$start "
26                 if [ $start = $answer ]
27                 then
28                         DISPLAY=$answer:0
29                 else
30                         DISPLAY=$answer
31                 fi
32                 export DISPLAY
33                 echo "Starting astor on $DISPLAY"
34         else
35                 echo "DISPLAY is not defined ! Astor cannot start !"
36                 exit
37         fi
40 #---------------------------------------------------------
41 #       Set the Class Path for Tango and Asor usage
42 #---------------------------------------------------------
44 LIB_DIR=@prefix@/share/java;        export LIB_DIR
45 APP_DIR=@prefix@/share/java;        export APP_DIR
47 TANGO_CLASS=$LIB_DIR/JTango.jar;   export TANGO_CLASS
49 ASTOR_CLASS=$LIB_DIR/Astor.jar;     export ASTOR_CLASS
50 JIVE_CLASS=$LIB_DIR/Jive.jar;       export JIVE_CLASS
51 LOGVIEWER=$LIB_DIR/LogViewer.jar;   export LOGVIEWER
52 LOG4J=$LIB_DIR/log4j.jar;                       export LOG4J
54 JSSHTERM=$LIB_DIR/JSSHTerminal.jar
55 DBBENCH=$LIB_DIR/DBBench.jar
57 ATK_CLASS=$LIB_DIR/ATKCore.jar:$LIB_DIR/ATKWidget.jar
58 ATK_CLASS=$ATK_CLASS:$APP_DIR/atkpanel.jar:$APP_DIR/tool_panels.jar
59 export ATK_CLASS
61 CLASSPATH=$TANGO_CLASS:$ASTOR_CLASS:$JIVE_CLASS:$ATK_CLASS:$LOGVIEWER:$JSSHTERM:$DBBENCH:$LOG4J
62 export CLASSPATH
64 #---------------------------------------------------------
65 #       Start the Astor process
66 #---------------------------------------------------------
69 @JAVA@ -mx128m -DTANGO_HOST=$TANGO_HOST admin.astor.Astor $*