aboutsummaryrefslogtreecommitdiff
path: root/kvmx
diff options
context:
space:
mode:
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