Setting scp-pem as default when select certificate (ks-upv/upa/upf/upr)
This commit is contained in:
parent
5c384a0350
commit
8c39912218
|
@ -690,6 +690,7 @@ function createConfig() {
|
|||
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
|
||||
cp -rf "${pem_path}" ${dirConfig}/connect.pem
|
||||
chmod 600 ${dirConfig}/connect.pem
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
echo "* PEM file copied to ${dirConfig}/connect.pem"
|
||||
else
|
||||
echo "+ File ${pem_path} does not exist"
|
||||
|
@ -706,7 +707,7 @@ function createConfig() {
|
|||
if [ -f ${dirConfig}/ks-upload-server ] ; then
|
||||
echo "+ The SERVER configuration already exists (Use: 'ks-upa -e' for edit)"
|
||||
else
|
||||
echo -n "* Enter the server URL: " ; read SERVER
|
||||
echo -n "* Enter the server URL (or IP): " ; read SERVER
|
||||
server=${SERVER}
|
||||
echo ${server} > ${dirConfig}/ks-upload-server
|
||||
fi
|
||||
|
@ -729,10 +730,15 @@ function createConfig() {
|
|||
# Configure upload tool by default
|
||||
if [ -f ${dirConfig}/ks-upload-tool ] ; then
|
||||
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upa -e' for edit)"
|
||||
else
|
||||
if [ "${PASS}" == "pem" ] ; then
|
||||
echo "* Setting 'scp-pem' as the default tool"
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
else
|
||||
echo "* Setting 'scp' as the default tool"
|
||||
echo "scp" > ${dirConfig}/ks-upload-tool
|
||||
fi
|
||||
fi
|
||||
# Configure port by default
|
||||
if [ -f ${dirConfig}/ks-upload-port ] ; then
|
||||
echo "+ The PORT configuration already exists (Use: 'ks-upa -e' for edit)"
|
||||
|
|
|
@ -717,6 +717,7 @@ function createConfig() {
|
|||
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
|
||||
cp -rf "${pem_path}" ${dirConfig}/connect.pem
|
||||
chmod 600 ${dirConfig}/connect.pem
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
echo "* PEM file copied to ${dirConfig}/connect.pem"
|
||||
else
|
||||
echo "+ File ${pem_path} does not exist"
|
||||
|
@ -733,7 +734,7 @@ function createConfig() {
|
|||
if [ -f ${dirConfig}/ks-upload-server ] ; then
|
||||
echo "+ The SERVER configuration already exists (Use: 'ks-upf -e' for edit)"
|
||||
else
|
||||
echo -n "* Enter the server URL: " ; read SERVER
|
||||
echo -n "* Enter the server URL (or IP): " ; read SERVER
|
||||
server=${SERVER}
|
||||
echo ${server} > ${dirConfig}/ks-upload-server
|
||||
fi
|
||||
|
@ -756,10 +757,15 @@ function createConfig() {
|
|||
# Configure upload tool by default
|
||||
if [ -f ${dirConfig}/ks-upload-tool ] ; then
|
||||
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upf -e' for edit)"
|
||||
else
|
||||
if [ "${PASS}" == "pem" ] ; then
|
||||
echo "* Setting 'scp-pem' as the default tool"
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
else
|
||||
echo "* Setting 'scp' as the default tool"
|
||||
echo "scp" > ${dirConfig}/ks-upload-tool
|
||||
fi
|
||||
fi
|
||||
# Configure port by default
|
||||
if [ -f ${dirConfig}/ks-upload-port ] ; then
|
||||
echo "+ The PORT configuration already exists (Use: 'ks-upf -e' for edit)"
|
||||
|
|
|
@ -576,6 +576,7 @@ function createConfig() {
|
|||
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
|
||||
cp -rf "${pem_path}" ${dirConfig}/connect.pem
|
||||
chmod 600 ${dirConfig}/connect.pem
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
echo "* PEM file copied to ${dirConfig}/connect.pem"
|
||||
else
|
||||
echo "+ File ${pem_path} does not exist"
|
||||
|
@ -592,7 +593,7 @@ function createConfig() {
|
|||
if [ -f ${dirConfig}/ks-upload-server ] ; then
|
||||
echo "+ The SERVER configuration already exists (Use: 'ks-upr -e' for edit)"
|
||||
else
|
||||
echo -n "* Enter the server URL: " ; read SERVER
|
||||
echo -n "* Enter the server URL (or IP): " ; read SERVER
|
||||
server=${SERVER}
|
||||
echo ${server} > ${dirConfig}/ks-upload-server
|
||||
fi
|
||||
|
@ -615,10 +616,15 @@ function createConfig() {
|
|||
# Configure upload tool by default
|
||||
if [ -f ${dirConfig}/ks-upload-tool ] ; then
|
||||
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upr -e' for edit)"
|
||||
else
|
||||
if [ "${PASS}" == "pem" ] ; then
|
||||
echo "* Setting 'scp-pem' as the default tool"
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
else
|
||||
echo "* Setting 'scp' as the default tool"
|
||||
echo "scp" > ${dirConfig}/ks-upload-tool
|
||||
fi
|
||||
fi
|
||||
# Configure port by default
|
||||
if [ -f ${dirConfig}/ks-upload-port ] ; then
|
||||
echo "+ The PORT configuration already exists (Use: 'ks-upr -e' for edit)"
|
||||
|
|
|
@ -690,6 +690,7 @@ function createConfig() {
|
|||
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
|
||||
cp -rf "${pem_path}" ${dirConfig}/connect.pem
|
||||
chmod 600 ${dirConfig}/connect.pem
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
echo "* PEM file copied to ${dirConfig}/connect.pem"
|
||||
else
|
||||
echo "+ File ${pem_path} does not exist"
|
||||
|
@ -706,7 +707,7 @@ function createConfig() {
|
|||
if [ -f ${dirConfig}/ks-upload-server ] ; then
|
||||
echo "+ The SERVER configuration already exists (Use: 'ks-upv -e' for edit)"
|
||||
else
|
||||
echo -n "* Enter the server URL: " ; read SERVER
|
||||
echo -n "* Enter the server URL (or IP): " ; read SERVER
|
||||
server=${SERVER}
|
||||
echo ${server} > ${dirConfig}/ks-upload-server
|
||||
fi
|
||||
|
@ -729,10 +730,15 @@ function createConfig() {
|
|||
# Configure upload tool by default
|
||||
if [ -f ${dirConfig}/ks-upload-tool ] ; then
|
||||
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upv -e' for edit)"
|
||||
else
|
||||
if [ "${PASS}" == "pem" ] ; then
|
||||
echo "* Setting 'scp-pem' as the default tool"
|
||||
echo "scp-pem" > ${dirConfig}/ks-upload-tool
|
||||
else
|
||||
echo "* Setting 'scp' as the default tool"
|
||||
echo "scp" > ${dirConfig}/ks-upload-tool
|
||||
fi
|
||||
fi
|
||||
# Configure port by default
|
||||
if [ -f ${dirConfig}/ks-upload-port ] ; then
|
||||
echo "+ The PORT configuration already exists (Use: 'ks-upv -e' for edit)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user