diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-04-01 17:54:28 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-04-01 17:54:28 -0300 |
commit | edc02316f465cfb073ca706910518dc4dea37cd7 (patch) | |
tree | 1546b455b2169f620145b0ce98f78f2bbd2cea15 | |
parent | 62d8dd5ea3a23c0713e11b8121d223a96da7fffc (diff) | |
download | kvmx-edc02316f465cfb073ca706910518dc4dea37cd7.tar.gz kvmx-edc02316f465cfb073ca706910518dc4dea37cd7.tar.bz2 |
Adds xpra log file
-rwxr-xr-x | kvmx | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -144,6 +144,7 @@ function __kvmx_initialize { SPICEFILE="$STATE_DIR/spice" LOGFILE="$LOG_DIR/qemu" SPICELOG="$LOG_DIR/spice" + XPRALOG="$LOG_DIR/xpra" if [ -e "$STORAGE/ssh/$VM.key" ]; then mkdir -p "$STORAGE/ssh" @@ -733,6 +734,10 @@ function kvmx_log { logs="$logs $SPICELOG" fi + if [ -s "$XPRALOG" ]; then + logs="$logs $XPRALOG" + fi + tail -F $logs } @@ -763,12 +768,17 @@ function kvmx_xpra { local action="$3" shift 3 + SSH="`cat $SSHFILE`" + if [ -z "$action" ]; then action="start" fi - SSH="`cat $SSHFILE`" - xpra $action --ssh="$SSH_COMMAND -p $SSH" ssh:$SSH_LOGIN@127.0.0.1 $* + if [ "$action" == "start" ] || [ "$action" == "attach" ]; then + nohup xpra $action --ssh="$SSH_COMMAND -p $SSH" ssh:$SSH_LOGIN@127.0.0.1 $* &> $XPRALOG < /dev/null & + else + xpra $action --ssh="$SSH_COMMAND -p $SSH" ssh:$SSH_LOGIN@127.0.0.1 $* + fi } # Alias for up command |