From e0543417015c807f8630ee858f7c6c747f206b11 Mon Sep 17 00:00:00 2001 From: q3aql Date: Sun, 12 Mar 2023 18:47:26 +0100 Subject: [PATCH] Change upload tool when select certificate --- src/ks-upa | 11 +++++++++++ src/ks-upf | 11 +++++++++++ src/ks-upr | 11 +++++++++++ src/ks-upv | 11 +++++++++++ 4 files changed, 44 insertions(+) diff --git a/src/ks-upa b/src/ks-upa index 2c98cfb..f698c03 100755 --- a/src/ks-upa +++ b/src/ks-upa @@ -569,9 +569,20 @@ function editConfig() { echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass cp -rf "${pem_path}" ${dirConfig}/connect.pem chmod 600 ${dirConfig}/connect.pem + if [ "${editUpvTool}" == "rsync" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "rsync-rsa" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp-rsa" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + fi echo "* PEM file copied to ${dirConfig}/connect.pem" else echo "+ File ${pem_path} does not exist" + echo "" + echo "+ Press ENTER to return menu " ; read continue fi else raw_password_enter=${PASS} diff --git a/src/ks-upf b/src/ks-upf index 45e1bb4..dd1ca38 100755 --- a/src/ks-upf +++ b/src/ks-upf @@ -596,9 +596,20 @@ function editConfig() { echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass cp -rf "${pem_path}" ${dirConfig}/connect.pem chmod 600 ${dirConfig}/connect.pem + if [ "${editUpvTool}" == "rsync" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "rsync-rsa" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp-rsa" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + fi echo "* PEM file copied to ${dirConfig}/connect.pem" else echo "+ File ${pem_path} does not exist" + echo "" + echo "+ Press ENTER to return menu " ; read continue fi else raw_password_enter=${PASS} diff --git a/src/ks-upr b/src/ks-upr index 274c638..77463e9 100755 --- a/src/ks-upr +++ b/src/ks-upr @@ -455,9 +455,20 @@ function editConfig() { echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass cp -rf "${pem_path}" ${dirConfig}/connect.pem chmod 600 ${dirConfig}/connect.pem + if [ "${editUpvTool}" == "rsync" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "rsync-rsa" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp-rsa" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + fi echo "* PEM file copied to ${dirConfig}/connect.pem" else echo "+ File ${pem_path} does not exist" + echo "" + echo "+ Press ENTER to return menu " ; read continue fi else raw_password_enter=${PASS} diff --git a/src/ks-upv b/src/ks-upv index dda7193..7502b92 100755 --- a/src/ks-upv +++ b/src/ks-upv @@ -569,9 +569,20 @@ function editConfig() { echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass cp -rf "${pem_path}" ${dirConfig}/connect.pem chmod 600 ${dirConfig}/connect.pem + if [ "${editUpvTool}" == "rsync" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "rsync-rsa" ] ; then + echo "rsync-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + elif [ "${editUpvTool}" == "scp-rsa" ] ; then + echo "scp-pem" > ${dirConfig}/ks-upload-tool + fi echo "* PEM file copied to ${dirConfig}/connect.pem" else echo "+ File ${pem_path} does not exist" + echo "" + echo "+ Press ENTER to return menu " ; read continue fi else raw_password_enter=${PASS}