logstash.rc 648 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. #
  3. # $OpenBSD: logstash.rc,v 1.3 2017/05/27 19:57:08 ajacoutot Exp $
  4. daemon_user="_logstash"
  5. daemon="${TRUEPREFIX}/logstash/bin/logstash"
  6. daemon_flags="--config ${SYSCONFDIR}/logstash/conf.d/ --log /var/log/logstash/logstash.log"
  7. . /etc/rc.d/rc.subr
  8. pexp="$(${LOCALBASE}/bin/javaPathHelper -c logstash).*logstash/runner.rb agent ${daemon_flags}"
  9. rc_bg=YES
  10. rc_reload=NO
  11. rc_start() {
  12. ${rcexec} "JAVA_HOME=\"$(${LOCALBASE}/bin/javaPathHelper -h logstash)\" \
  13. JAVA_OPTS=\"${JAVA_OPTS} -Djava.library.path=${LOCALBASE}/jruby/lib/jni/${JFFI_ARCH}\" \
  14. SINCEDB_DIR=\"/var/db/logstash\" \
  15. ${daemon} ${daemon_flags}"
  16. }
  17. rc_cmd $1