syslog-ng: replace hardcoded paths with variables
authorPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 25 Jul 2017 20:13:53 +0000 (14:13 -0600)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Wed, 26 Jul 2017 17:54:06 +0000 (11:54 -0600)
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
admin/syslog-ng/files/syslog-ng.init

index cecb3f9047937e9ee886a0e3405422d88625769f..6036dd900ba0889c2f12053756978bf83b9ce458 100644 (file)
@@ -2,18 +2,23 @@
 # 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/log/syslog-ng.pid
+
+config_file=/etc/syslog-ng.conf
 
 start() {
-       [ -f /etc/syslog-ng.conf ] || return 1
-       service_start /usr/sbin/syslog-ng
+       [ -f $config_file ] || return 1
+       service_start $PROG -p $SERVICE_PID_FILE
 }
 
 stop() {
-       service_stop /usr/sbin/syslog-ng
+       service_stop $PROG
 }
 
 reload() {
-       service_reload /usr/sbin/syslog-ng
+       service_reload $PROG
 }