helpers/sonews
changeset 75 41d6c0cac8b3
parent 1 6fceb66e1ad7
     1.1 --- a/helpers/sonews	Fri Jun 26 16:48:50 2009 +0200
     1.2 +++ b/helpers/sonews	Thu Oct 13 03:09:22 2011 +0200
     1.3 @@ -1,6 +1,7 @@
     1.4  #!/bin/bash
     1.5  
     1.6  CLASSPATH=/usr/share/java/sonews.jar:\
     1.7 +/usr/share/java/sonews-helpers.jar:\
     1.8  /usr/share/java/mysql-connector-java.jar:\
     1.9  /usr/share/java/glassfish-mail.jar:\
    1.10  /usr/share/java/postgresql.jar
    1.11 @@ -9,7 +10,7 @@
    1.12  PIDFILE=/var/run/sonews.pid
    1.13  ARGS="-mlgw -c /etc/sonews/sonews.conf -feed"
    1.14  
    1.15 -MAINCLASS=org.sonews.daemon.Main
    1.16 +MAINCLASS=org.sonews.Main
    1.17  JAVA=java
    1.18  
    1.19  case "$1" in
    1.20 @@ -31,12 +32,18 @@
    1.21      done
    1.22      echo "done."
    1.23      ;;
    1.24 +  restart)
    1.25 +    $0 stop && $0 start
    1.26 +    ;;
    1.27    setup)
    1.28      $JAVA -classpath $CLASSPATH org.sonews.util.DatabaseSetup
    1.29      ;;
    1.30    purge)
    1.31      $JAVA -classpath $CLASSPATH org.sonews.util.Purger
    1.32      ;;
    1.33 +  version)
    1.34 +    $JAVA -classpath $CLASSPATH $MAINCLASS -version
    1.35 +    ;;
    1.36    *)
    1.37      echo "Usage: sonews [start|stop|restart|setup|purge]"
    1.38  esac