From 241960f2dbf36f2f18c93c3308fe86d7b24d145a Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 9 Nov 2011 19:49:03 +0000 Subject: [PATCH] packages/syslog-ng{,3}: use new service functions git-svn-id: svn://svn.openwrt.org/openwrt/packages@28891 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- admin/syslog-ng/Makefile | 4 ++-- admin/syslog-ng/files/syslog-ng.init | 24 ++++++++---------------- admin/syslog-ng3/Makefile | 2 +- admin/syslog-ng3/files/syslog-ng.init | 24 ++++++++---------------- 4 files changed, 19 insertions(+), 35 deletions(-) diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile index 6db882a0c..2ba6d4bc2 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 06672e87d..a8bad3d98 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 } - diff --git a/admin/syslog-ng3/Makefile b/admin/syslog-ng3/Makefile index 3372377e5..f05499e00 100644 --- a/admin/syslog-ng3/Makefile +++ b/admin/syslog-ng3/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=syslog-ng PKG_VERSION:=3.0.5 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/$(PKG_VERSION)/source/ PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz diff --git a/admin/syslog-ng3/files/syslog-ng.init b/admin/syslog-ng3/files/syslog-ng.init index 4609f6fab..a8bad3d98 100644 --- a/admin/syslog-ng3/files/syslog-ng.init +++ b/admin/syslog-ng3/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.conf ] || { - echo "/etc/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 } -