diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-12-31 16:45:59 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-12-31 16:45:59 -0200 |
commit | 7c09b537bfee67d293785f0e5a2b564f890a1600 (patch) | |
tree | 71f56737f5cc8275c90a89331717324f3f03c3bf | |
parent | c12e7ec593a82ece79bda46415d03022c7c6c5b3 (diff) | |
download | kvmx-7c09b537bfee67d293785f0e5a2b564f890a1600.tar.gz kvmx-7c09b537bfee67d293785f0e5a2b564f890a1600.tar.bz2 |
Minor kvmx-supervise fixes
-rwxr-xr-x | kvmx-supervise | 7 |
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 |