aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-21 08:13:59 -0300
committerEuAndreh <eu@euandre.org>2023-03-21 08:13:59 -0300
commit6dea09099cad2ef887409d5a80d69fe4ef707860 (patch)
tree7ade612b1805bab4ea48cdd2ff5264d81de999fc
parentbin/untill: Add support for "-m MAX" option (diff)
downloaddotfiles-6dea09099cad2ef887409d5a80d69fe4ef707860.tar.gz
dotfiles-6dea09099cad2ef887409d5a80d69fe4ef707860.tar.xz
bin/vm: Do not fail when VM is already up or down
-rwxr-xr-xbin/vm4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/vm b/bin/vm
index 2296f72..f931f68 100755
--- a/bin/vm
+++ b/bin/vm
@@ -262,7 +262,7 @@ case "$ACTION" in
if [ -e "$PID_F" ]; then
printf 'The VM for "%s" is already running with PID %s.\n' \
"$OS" "$(cat "$PID_F")" >&2
- exit 1
+ exit
fi
if [ -z "$IMAGE" ]; then
@@ -314,7 +314,7 @@ case "$ACTION" in
if [ ! -e "$PID_F" ]; then
printf 'The VM for "%s" is not running, already.\n' "$OS" >&2
- exit 1
+ exit
fi
PID="$(cat "$PID_F")"