From feb055c975f71fe62dd799ecef6661cec87cf7e0 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 5 Feb 2012 03:20:23 +0000 Subject: [PATCH] [packages_10.03.2] syslog-ng: merge r28891 SVN-Revision: 30168 --- admin/syslog-ng/Makefile | 4 ++-- admin/syslog-ng/files/syslog-ng.init | 24 ++++++++---------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile index 6db882a0c3..2ba6d4bc2d 100644 --- a/admin/syslog-ng/Makefile +++ b/admin/syslog-ng/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=syslog-ng PKG_VERSION:=1.6.12 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MD5SUM:=a3cbfdb6e1e5beea181a7349749719f3 PKG_SOURCE_URL:= \ diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init index 06672e87d8..a8bad3d989 100644 --- a/admin/syslog-ng/files/syslog-ng.init +++ b/admin/syslog-ng/files/syslog-ng.init @@ -1,27 +1,19 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 +SERVICE_USE_PID=1 + start() { - [ -f /etc/syslog-ng/syslog-ng.conf ] || { - echo "/etc/syslog-ng/syslog-ng.conf does not exist !"; - exit 0; - }; - [ -d /var/run ] || mkdir -p /var/run - [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng + [ -f /etc/syslog-ng.conf ] || return 1 + service_start /usr/sbin/syslog-ng } stop() { - killall syslog-ng -} - -restart() { - stop - sleep 1 - start + service_stop /usr/sbin/syslog-ng } reload() { - kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null + service_reload /usr/sbin/syslog-ng } - -- 2.30.2