Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
projects
:
monitoring
>
graylog2-server
> fixinit.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File fixinit.patch of Package graylog2-server
diff -up graylog2-server-0.10.0-rc.4/bin/graylog2ctl.rpm graylog2-server-0.10.0-rc.4/bin/graylog2ctl --- graylog2-server-0.10.0-rc.4/bin/graylog2ctl.rpm 2013-01-30 15:35:07.000000000 -0500 +++ graylog2-server-0.10.0-rc.4/bin/graylog2ctl 2013-02-04 13:06:06.413465592 -0500 @@ -1,31 +1,27 @@ #!/bin/bash +# +# graylog2: graylog2 server daemon +# +# chkconfig: - 23 84 +# description: Graylog2-server daemon for log mgmt +# +# processname: graylog2-server +# pidfile: /var/run/graylog2.pid -CMD=$1 -NOHUP=`which nohup` - -# resolve links - $0 may be a softlink -GRAYLOG2CTL="$0" -while [ -h "$GRAYLOG2CTL" ]; do - ls=`ls -ld "$GRAYLOG2CTL"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - GRAYLOG2CTL="$link" - else - GRAYLOG2CTL=`dirname "$GRAYLOG2CTL"`/"$link" - fi -done +CMD=$1 +NOHUP=/usr/bin/nohup -GRAYLOG2CTL_DIR=`dirname "$GRAYLOG2CTL"` +GRAYLOG2CTL_DIR=/usr/share/graylog2-server GRAYLOG2_SERVER_JAR=graylog2-server.jar GRAYLOG2_CONF=/etc/graylog2.conf -GRAYLOG2_PID=/tmp/graylog2.pid -LOG_FILE=log/graylog2-server.log +GRAYLOG2_PID=/var/run/graylog2/graylog2.pid +LOG_FILE=/var/log/graylog2/server.log start() { echo "Starting graylog2-server ..." cd "$GRAYLOG2CTL_DIR/.." - $NOHUP java -jar ${GRAYLOG2_SERVER_JAR} -f ${GRAYLOG2_CONF} -p ${GRAYLOG2_PID} >> ${LOG_FILE} & + su - graylog2 -s /bin/bash -c "$NOHUP java -jar ${GRAYLOG2_SERVER_JAR} -f ${GRAYLOG2_CONF} -p ${GRAYLOG2_PID} >> ${LOG_FILE} 2>&1 &" } stop() {