aboutsummaryrefslogtreecommitdiff
path: root/kvmx-supervise
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-12-31 16:45:59 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-12-31 16:45:59 -0200
commit7c09b537bfee67d293785f0e5a2b564f890a1600 (patch)
tree71f56737f5cc8275c90a89331717324f3f03c3bf /kvmx-supervise
parentc12e7ec593a82ece79bda46415d03022c7c6c5b3 (diff)
downloadkvmx-7c09b537bfee67d293785f0e5a2b564f890a1600.tar.gz
kvmx-7c09b537bfee67d293785f0e5a2b564f890a1600.tar.bz2
Minor kvmx-supervise fixes
Diffstat (limited to 'kvmx-supervise')
-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