Change upload tool when select certificate

This commit is contained in:
q3aql 2023-03-12 18:47:26 +01:00
parent faead28243
commit e054341701
4 changed files with 44 additions and 0 deletions

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}