bin/sonews.sh
changeset 34 9f0b95aafaa3
parent 32 3af4237e4a15
child 76 b5690fc25af6
     1.1 --- a/bin/sonews.sh	Sun Aug 29 17:03:21 2010 +0200
     1.2 +++ b/bin/sonews.sh	Sun Aug 29 17:04:25 2010 +0200
     1.3 @@ -1,17 +1,18 @@
     1.4  #!/bin/bash
     1.5 -SCRIPTROOT=$(pwd)
     1.6 -CLASSPATH=$SCRIPTROOT/lib/sonews.jar:\
     1.7 -$SCRIPTROOT/lib/sonews-helpers.jar:\
     1.8 -$SCRIPTROOT/lib/mysql-connector-java.jar:\
     1.9 -$SCRIPTROOT/lib/glassfish-mail.jar:\
    1.10 -$SCRIPTROOT/lib/postgresql.jar
    1.11 +cd `dirname $0`/..
    1.12 +NEWSROOT=`pwd`
    1.13 +CLASSPATH=$NEWSROOT/lib/sonews.jar:\
    1.14 +$NEWSROOT/lib/sonews-helpers.jar:\
    1.15 +$NEWSROOT/lib/mysql-connector-java.jar:\
    1.16 +$NEWSROOT/lib/glassfish-mail.jar:\
    1.17 +$NEWSROOT/lib/postgresql.jar
    1.18  
    1.19 -LOGFILE=sonews.log
    1.20 -PIDFILE=sonews.pid
    1.21 +LOGFILE=/var/log/sonews.log
    1.22 +PIDFILE=/var/pid/sonews.pid
    1.23  ARGS=$@
    1.24  
    1.25 -MAINCLASS=org.sonews.daemon.Main
    1.26 -JAVA=java
    1.27 +MAINCLASS=org.sonews.Main
    1.28 +JAVA=$JAVA_HOME/bin/java
    1.29  
    1.30  case "$1" in
    1.31    start)