From 57c6469df4938c80f9cb3268c9d313d7fae7a362 Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 15 Nov 2011 03:40:56 +0000 Subject: [PATCH] packages/privoxy: use new service functions Signed-off-by: Peter Wagner git-svn-id: svn://svn.openwrt.org/openwrt/packages@29151 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/privoxy/Makefile | 2 +- net/privoxy/files/privoxy.init | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/net/privoxy/Makefile b/net/privoxy/Makefile index 2cc6bff64..a70deaca8 100644 --- a/net/privoxy/Makefile +++ b/net/privoxy/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=privoxy PKG_VERSION:=3.0.17 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable-src.tar.gz PKG_SOURCE_URL:=@SF/ijbswa diff --git a/net/privoxy/files/privoxy.init b/net/privoxy/files/privoxy.init index 85479b338..0afe4c490 100644 --- a/net/privoxy/files/privoxy.init +++ b/net/privoxy/files/privoxy.init @@ -1,16 +1,16 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org -START=50 +# Copyright (C) 2006-2011 OpenWrt.org -CFG_F=/etc/privoxy/config -RUN_D=/var/run -PID_F=$RUN_D/privoxy.pid +START=50 +STOP=50 + +SERVICE_USE_PID=1 start() { - mkdir -p $RUN_D - /usr/sbin/privoxy --pidfile $PID_F $CFG_F + service_start /usr/sbin/privoxy --pidfile /var/run/privoxy.pid \ + /etc/privoxy/config } stop() { - [ -f $PID_F ] && kill $(cat $PID_F) + service_stop /usr/sbin/privoxy }