diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-05-27 18:57:08 +0000 |
commit | 34f9dde6d7bc82cef01eb7b3ab001f3e058782f2 (patch) | |
tree | bebd390e420aa1556459c192836e271417411273 /lib/container/restart | |
parent | Adding upstream version 20180503. (diff) | |
download | open-infrastructure-compute-tools-34f9dde6d7bc82cef01eb7b3ab001f3e058782f2.tar.xz open-infrastructure-compute-tools-34f9dde6d7bc82cef01eb7b3ab001f3e058782f2.zip |
Adding upstream version 20180527.upstream/20180527
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/restart')
-rwxr-xr-x | lib/container/restart | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/container/restart b/lib/container/restart index a507cc0..a22b970 100755 --- a/lib/container/restart +++ b/lib/container/restart @@ -27,6 +27,8 @@ MACHINES="/var/lib/machines" Parameters () { + OPTIONS_ALL="" + GETOPT_LONGOPTIONS="name:," GETOPT_OPTIONS="n:," @@ -74,6 +76,19 @@ then Usage fi +case "${NAME}" in + ALL) + NAMES="$(container list --format shell --started)" + + for NAME in ${NAMES} + do + container restart --name ${NAME} || true + done + + exit 0 + ;; +esac + if [ ! -e "${MACHINES}/${NAME}" ] then echo "'${NAME}': no such container" >&2 |