aboutsummaryrefslogtreecommitdiff
path: root/kvmx
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-13 18:26:28 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-13 18:26:28 -0300
commitbc5a65b517273a3bc59ecd27fed5fce29fa7a6cb (patch)
tree947ef5635ad7e34daaee780dba8c4aa777a04a47 /kvmx
parent72827921d99f35686602ef8eb6ee56eaa6824b23 (diff)
downloadkvmx-bc5a65b517273a3bc59ecd27fed5fce29fa7a6cb.tar.gz
kvmx-bc5a65b517273a3bc59ecd27fed5fce29fa7a6cb.tar.bz2
Adds ssh_custom_pubkey config
Diffstat (limited to 'kvmx')
-rwxr-xr-xkvmx12
1 files changed, 7 insertions, 5 deletions
diff --git a/kvmx b/kvmx
index aaa3f95..b00c747 100755
--- a/kvmx
+++ b/kvmx
@@ -181,11 +181,13 @@ function __kvmx_initialize {
MONITORFILE="$STATE_DIR/monitor"
CONSOLEFILE="$STATE_DIR/console"
- if [ -e "$DATADIR/ssh/$VM.key" ]; then
- mkdir -p "$DATADIR/ssh"
- SSHKEY="$DATADIR/ssh/$VM.key"
- else
- SSHKEY="$APP_BASE/share/ssh/insecure_private_key"
+ if [ -z "$ssh_custom_pubkey" ]; then
+ if [ -e "$DATADIR/ssh/$VM.key" ]; then
+ mkdir -p "$DATADIR/ssh"
+ SSHKEY="$DATADIR/ssh/$VM.key"
+ else
+ SSHKEY="$APP_BASE/share/ssh/insecure_private_key"
+ fi
fi
if [ ! -z "$user" ]; then