You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
501 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. START=20
  4. PROG=/usr/sbin/syslog-ng
  5. PROG2=/usr/sbin/syslog-ng-ctl
  6. SERVICE_USE_PID=1
  7. SERVICE_PID_FILE=/var/run/syslog-ng.pid
  8. config_file=/etc/syslog-ng.conf
  9. start() {
  10. [ -f $config_file ] || return 1
  11. if ! $PROG -s 2>/dev/null ; then
  12. echo "Couldn't parse $(basename $config_file)" >&2
  13. exit 1
  14. fi
  15. service_start $PROG --process-mode background \
  16. -p $SERVICE_PID_FILE
  17. }
  18. stop() {
  19. service_stop $PROG
  20. }
  21. reload() {
  22. $PROG2 reload
  23. }