aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkvmx-supervise7
1 files changed, 4 insertions, 3 deletions
diff --git a/kvmx-supervise b/kvmx-supervise
index b7f9e7f..41f4990 100755
--- a/kvmx-supervise
+++ b/kvmx-supervise
@@ -21,7 +21,6 @@
# Parameters
BASENAME="`basename $0`"
DIRNAME="`dirname $0`"
-GLOBAL_USER_CONFIG_FILE="$HOME/.config/kvmxconfig"
INSTANCES="`ls -1 /home/*/.config/kvmx/*`"
ACTION="$1"
@@ -83,11 +82,12 @@ function kvmx_supervise_call {
fi
# Operate only with VMs configured with supervise_manage=1
- supervise="`su $user -c "kvmx config supervise_manage"`"
+ # Specify /bin/bash to avoid restricted shells like kvmx-shell
+ supervise="`su $user -s /bin/bash -c "kvmx config supervise_manage"`"
# Dispatch
if [ "$supervise_manage" == "1" ]; then
- su $user -c "kvmx $vm $*"
+ su $user -s /bin/bash -c "kvmx $vm $*"
fi
}
@@ -128,6 +128,7 @@ function kvmx_supervise_restart {
if type kvmx_supervise_$ACTION 2> /dev/null | grep -q "kvmx_supervise_$ACTION ()"; then
__kvmx_supervise_initialize $*
+ shift
kvmx_supervise_$ACTION $*
else
kvmx_supervise_usage