Sha256: 50af3b958221191b53a32e63e1244b14124d0aed1347b009db6f624fbddc429a
Contents?: true
Size: 1.54 KB
Versions: 25
Compression:
Stored size: 1.54 KB
Contents
#!/bin/sh # # chkconfig: - 70 45 # description: The LogStash collection agent # processname: logstash-agent # config: /etc/sysconfig/logstash # Standard LSB functions #. /lib/lsb/init-functions # Source function library. . /etc/init.d/functions # Defaults. Override in /etc/sysconfig/logstash-agent OPTIONS="" DEBUG=false DIR=/opt/logstash CONFIG=$DIR/etc/logstash-agent.yaml LOGFILE=/var/log/logstash-agent.log if [ -f /etc/sysconfig/logstash-agent ]; then . /etc/sysconfig/logstash-agent fi RETVAL=0 prog="logstash-agent" start () { echo -n $"Starting $prog: " if $DEBUG; then OPTIONS="$OPTIONS -d" fi OPTIONS="$OPTIONS --pidfile /var/run/logstash-agent.pid" OPTIONS="$OPTIONS --logfile $LOGFILE" OPTIONS="$OPTIONS $CONFIG" daemon --pidfile /var/run/logstash-agent.pid \ $DIR/bin/logstash-agent $OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/logstash-agent } stop () { echo -n $"Stopping $prog: " killproc -p /var/run/logstash-agent.pid logstash-agent RETVAL=$? echo if [ $RETVAL -eq 0 ] ; then rm -f /var/lock/subsys/logstash-agent rm -f /var/run/logstash-agent.pid fi } restart () { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status -p /var/run/logstash-agent.pid logstash-agent ;; restart|reload|force-reload) restart ;; condrestart) [ -f /var/lock/subsys/logstash-agent ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" exit 1 esac exit $?
Version data entries
25 entries across 25 versions & 1 rubygems