diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 18:26:28 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 18:26:28 -0300 |
commit | bc5a65b517273a3bc59ecd27fed5fce29fa7a6cb (patch) | |
tree | 947ef5635ad7e34daaee780dba8c4aa777a04a47 /kvmx | |
parent | 72827921d99f35686602ef8eb6ee56eaa6824b23 (diff) | |
download | kvmx-bc5a65b517273a3bc59ecd27fed5fce29fa7a6cb.tar.gz kvmx-bc5a65b517273a3bc59ecd27fed5fce29fa7a6cb.tar.bz2 |
Adds ssh_custom_pubkey config
Diffstat (limited to 'kvmx')
-rwxr-xr-x | kvmx | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |