From b10b785f506619de67ffe1bd0a3cc87d27658a30 Mon Sep 17 00:00:00 2001 From: sthen Date: Fri, 6 Apr 2012 11:47:54 +0000 Subject: [PATCH] In freedt, change svscan's rc script to shut down daemons started by svscan when "svscan stop" is run. From Marcus Merighi with feedback from me. --- sysutils/freedt/Makefile | 5 +++-- sysutils/freedt/pkg/svscan.rc | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sysutils/freedt/Makefile b/sysutils/freedt/Makefile index 4e8a1201f19..7eed42384f7 100644 --- a/sysutils/freedt/Makefile +++ b/sysutils/freedt/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.10 2012/01/01 16:16:24 sthen Exp $ +# $OpenBSD: Makefile,v 1.11 2012/04/06 11:47:54 sthen Exp $ -COMMENT= reimplementation of Dan Bernstein's daemontools +COMMENT= reimplementation of Dan Bernstein's daemontools #' DISTNAME= freedt-0.22 +REVISION= 0 CATEGORIES= sysutils HOMEPAGE= http://offog.org/code/freedt.html diff --git a/sysutils/freedt/pkg/svscan.rc b/sysutils/freedt/pkg/svscan.rc index 880a08077cf..23d6a99a83b 100755 --- a/sysutils/freedt/pkg/svscan.rc +++ b/sysutils/freedt/pkg/svscan.rc @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: svscan.rc,v 1.1 2012/01/01 16:16:24 sthen Exp $ +# $OpenBSD: svscan.rc,v 1.2 2012/04/06 11:47:54 sthen Exp $ daemon="${TRUEPREFIX}/bin/svscan" daemon_flags="/service/" @@ -10,4 +10,11 @@ daemon_flags="/service/" rc_bg=YES rc_reload=NO +rc_stop() { + pkill -f "^${pexp}" + sleep 1 + ${TRUEPREFIX}/bin/svc -X ${daemon_flags}/* + ${TRUEPREFIX}/bin/svc -X ${daemon_flags}/*/log +} + rc_cmd $1