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

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2016 OpenWrt.org
START=20
PROG=/usr/sbin/syslog-ng
PROG2=/usr/sbin/syslog-ng-ctl
SERVICE_USE_PID=1
SERVICE_PID_FILE=/var/run/syslog-ng.pid
config_file=/etc/syslog-ng.conf
start() {
[ -f $config_file ] || return 1
if ! $PROG -s 2>/dev/null ; then
echo "Couldn't parse $(basename $config_file)" >&2
exit 1
fi
service_start $PROG --process-mode background \
-p $SERVICE_PID_FILE
}
stop() {
service_stop $PROG
}
reload() {
$PROG2 reload
}