Update:
[ipfire-2.x.git] / src / init.d / applejuice
CommitLineData
6ef0bff8
MT
1#!/bin/bash
2HOME=/opt/applejuice
3JAVA=/usr/bin/java
4. /var/ipfire/applejuice/settings
5
6
7case "$1" in
8 start)
6ef0bff8
MT
9 cd $HOME
10 screen -dmS ajcore $JAVA -Xmx${RAMSIZE}m -Djava.library.path=. -jar ajcore.jar
11 echo -e "Applejuice is running!"; logger -t ipfire "Applejuice started!"
12 ;;
13 stop)
14 killall -9 java
15 echo -e "Applejuice is stopped!"; logger -t ipfire "Applejuice stopped!"
16 ;;
17 status)
18 if pidof java > /dev/null ; then
19 echo -e "Applejuice is running!"
20 exit 0
21 else
22 echo -e "Applejuice is not running!"
23 exit 1
24 fi
25 ;;
27e4cd2f
MT
26 restart)
27 $0 stop
28 $0 start
29 ;;
6ef0bff8 30 *)
27e4cd2f 31 echo -e "Usage: $0 (start|stop|restart|status)"
5ac2da9f 32esac