summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2011-12-31 02:41:59 +0100
committerChristian Ruppert <idl0r@gentoo.org>2011-12-31 02:41:59 +0100
commitfb8db18d79b4efc65c2b04a66a8e9e3b56f21f00 (patch)
tree0d24276822e7a05158d2462fe1a856afba285591
parent6d5a2d5f9e5c1e3cb4c24dfc0c2ed2c118d8e64c (diff)
downloadopenrc-fb8db18d79b4efc65c2b04a66a8e9e3b56f21f00.tar.gz
openrc-fb8db18d79b4efc65c2b04a66a8e9e3b56f21f00.tar.bz2
openrc-fb8db18d79b4efc65c2b04a66a8e9e3b56f21f00.tar.xz
Add "retry" option for the stop() template
-rw-r--r--man/runscript.85
-rw-r--r--sh/runscript.sh.in1
2 files changed, 5 insertions, 1 deletions
diff --git a/man/runscript.8 b/man/runscript.8
index 9439b76..77b2399 100644
--- a/man/runscript.8
+++ b/man/runscript.8
@@ -21,7 +21,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 4, 2009
+.Dd December 31, 2011
.Dt RUNSCRIPT 8 SMM
.Os OpenRC
.Sh NAME
@@ -112,6 +112,9 @@ List of arguments to pass to the daemon when starting.
Pidfile to use for the above defined command.
.It Ar name
Display name used for the above defined command.
+.It Ar retry
+You can either specify a timeout in seconds or a multiple signal/timeout pairs
+as a stopping schedule. This is only used during stop().
.El
.Sh DEPENDENCIES
You should define a
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index b738b89..470f04c 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -151,6 +151,7 @@ stop()
[ -n "$command" -o -n "$procname" -o -n "$pidfile" ] || return 0
ebegin "Stopping ${name:-$RC_SVCNAME}"
start-stop-daemon --stop \
+ ${retry:+--retry} $retry \
${command:+--exec} $command \
${procname:+--name} $procname \
${pidfile:+--pidfile} $pidfile \