diff options
Diffstat (limited to 'libexec/container/stop')
-rwxr-xr-x | libexec/container/stop | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/libexec/container/stop b/libexec/container/stop index 793b323..8ca98ce 100755 --- a/libexec/container/stop +++ b/libexec/container/stop @@ -34,7 +34,7 @@ Parameters () { OPTIONS_ALL="" - GETOPT_LONGOPTIONS="name:,force,interactive,kill,clean,verbose," + GETOPT_LONGOPTIONS="name:,force,interactive,kill,clean,stateless,verbose," GETOPT_OPTIONS="n:,f,i,k,v," PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})" @@ -84,6 +84,14 @@ Parameters () OPTONS_ALL="${OPTIONS_ALL} --clean" ;; + --stateless) + # internal option + STATELESS="true" + shift 1 + + OPTIONS_ALL="${OPTIONS_ALL} --stateless" + ;; + -v|--verbose) VERBOSE="true" shift 1 @@ -326,8 +334,15 @@ case "${KILL}" in ;; esac -mkdir -p "/var/lib/${SOFTWARE}/state" -echo "stop" > "/var/lib/${SOFTWARE}/state/${NAME}.run" +case "${STATELESS}" in + true) + ;; + + *) + mkdir -p "/var/lib/${SOFTWARE}/state" + echo "stop" > "/var/lib/${SOFTWARE}/state/${NAME}.run" + ;; +esac case "${VERBOSE}" in true) |