]>
Commit | Line | Data |
---|---|---|
0ed41f8b | 1 | #!/bin/sh |
2 | ||
3 | JX_OPTS=-Djxplorer.config="$HOME/.JXplorer" | |
4 | JX_JAVADIR=/usr/share/java/JXplorer | |
5 | JX_DATADIR=/usr/share/JXplorer | |
6 | ||
6ecaf4d8 | 7 | # Get config. |
8 | [ -f /etc/sysconfig/jxplorer ] && . /etc/sysconfig/jxplorer | |
0ed41f8b | 9 | |
10 | JAVA_BIN="$JAVA_HOME/bin/java" | |
11 | ||
12 | if ! [ -d "$HOME/.JXplorer" ]; then | |
13 | mkdir "$HOME/.JXplorer" | |
14 | cp /etc/JXplorer/connections.txt "$HOME/.JXplorer/connections.txt" | |
15 | ln -s /etc/JXplorer/log4j.xml "$HOME/.JXplorer/log4j.xml" | |
b6413223 | 16 | cp /etc/JXplorer/jxconfig.txt "$HOME/.JXplorer/jxconfig.txt" |
17 | ln -s $JX_DATADIR/templates "$HOME/.JXplorer/templates" | |
18 | ln -s $JX_DATADIR/security "$HOME/.JXplorer/security" | |
0ed41f8b | 19 | fi |
20 | ||
b6413223 | 21 | cd "$HOME/.JXplorer" |
0ed41f8b | 22 | CLASSPATH=`build-classpath junit jhall` |
23 | CLASSPATH="$CLASSPATH:$JX_JAVADIR/jxplorer.jar:$JX_JAVADIR/help.jar" | |
24 | export CLASSPATH | |
0ed41f8b | 25 | |
6ecaf4d8 | 26 | if [ "$#" == "0" ]; then |
27 | exec "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer < /dev/null > /dev/null 2>&1 & | |
28 | else if [ "$1" = "console" ] ; then | |
29 | exec "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer | |
30 | else | |
31 | echo "Usage: $0 [console|help]" | |
32 | fi | |
0ed41f8b | 33 | fi |