7 PIDFILE
="/tmp/graylog2.pid"
10 [ ! -f "$PIDFILE" ] && return 1
11 local PID
=$
(cat "$PIDFILE" 2> /dev
/null
)
12 [ -z "$PID" ] && return 1
13 if [ ! -d "/proc/$PID" ]; then
14 rm -f "$PIDFILE" 2> /dev
/null
22 local PID
=$
(cat "$PIDFILE" 2> /dev
/null
)
23 kill $PID &> /dev
/null
32 while check_pid
; do sleep 1; done
37 stat_busy
"Starting graylog2"
38 check_pid ||
$JAVA_HOME/bin
/java
-jar $JAVA_OPTS /usr
/lib
/graylog2-server.jar
> /dev
/null
&
47 stat_busy
"Stopping graylog2"
61 echo "usage: $0 {start|stop|restart}"