From d1c3e2420f56a147af05b80aad4257d2f9141ef1 Mon Sep 17 00:00:00 2001 From: Thomas Eckert Date: Fri, 29 Sep 2017 14:48:51 +0200 Subject: [PATCH] Add messaging to __process --- cdist/conf/type/__process/gencode-remote | 9 ++++++--- cdist/conf/type/__process/man.rst | 12 +++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/cdist/conf/type/__process/gencode-remote b/cdist/conf/type/__process/gencode-remote index 1a606f5d..fc491321 100755 --- a/cdist/conf/type/__process/gencode-remote +++ b/cdist/conf/type/__process/gencode-remote @@ -2,6 +2,7 @@ # # 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) # 2014 Steven Armstrong (steven-cdist at armstrong.cc) +# 2017 Thomas Eckert (tom at it-eckert.de) # # This file is part of cdist. # @@ -45,13 +46,15 @@ case "$state_should" in else echo "$name" fi + echo "started" >> "$__messages_out" ;; absent) - if [ -f "$__object/parameter/stop" ]; then + if [ -f "$__object/parameter/stop" ]; then cat "$__object/parameter/stop" - else + else echo kill "${runs}" - fi + fi + echo "stopped" >> "$__messages_out" ;; *) echo "Unknown state: $state_should" >&2 diff --git a/cdist/conf/type/__process/man.rst b/cdist/conf/type/__process/man.rst index e439f37c..e7303c55 100644 --- a/cdist/conf/type/__process/man.rst +++ b/cdist/conf/type/__process/man.rst @@ -30,6 +30,15 @@ start Executable to use for starting the process. +MESSAGES +-------- +started + The process was started. + +stopped + The process was stopped. + + EXAMPLES -------- @@ -63,7 +72,8 @@ SEE ALSO AUTHORS ------- -Nico Schottelius +| Nico Schottelius +| Thomas Eckert COPYING