aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-30 21:21:14 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-30 21:21:14 -0200
commit6caa894e58e5b55df3bedddfe4fb1e62c7ccb967 (patch)
tree278c8eff63ed2470ad2ed34a937a9a21ed7db6e2
parent5844ec7bc0686cdb911f2588d3ea56471bb71784 (diff)
downloadkvmx-6caa894e58e5b55df3bedddfe4fb1e62c7ccb967.tar.gz
kvmx-6caa894e58e5b55df3bedddfe4fb1e62c7ccb967.tar.bz2
Adds startup_command config
-rwxr-xr-xkvmx5
-rw-r--r--kvmxfile4
2 files changed, 9 insertions, 0 deletions
diff --git a/kvmx b/kvmx
index 1b8e06d..fc7ba38 100755
--- a/kvmx
+++ b/kvmx
@@ -450,6 +450,11 @@ function kvmx_up {
$DIRNAME/$BASENAME xephyr $VM
fi
+ if [ ! -z "$startup_command" ] && [ "$ssh_support" == "y" ]; then
+ echo "Running $startup_command..."
+ echo "nohup $startup_command" | kvmx ssh $VM &> /dev/null &
+ fi
+
kvmx_status
}
diff --git a/kvmxfile b/kvmxfile
index c0650d3..6926e21 100644
--- a/kvmxfile
+++ b/kvmxfile
@@ -36,6 +36,10 @@ shared_folder_mountpoint="/home/$user/code/$VM"
#provision_command="/usr/local/share/kvmx/provision/development"
#provision_command="/usr/local/share/kvmx/provision/desktop-basic"
+# Startup command
+#startup_command="/path/to/custom/command"
+#startup_command="hydractl upgrade"
+
# Graphics
# See https://wiki.archlinux.org/index.php/QEMU#Graphics
#graphics="-vga std -nographic -vnc :$GUEST_DISPLAY"