diff --git a/src/ks-upa b/src/ks-upa index 5ab1c73..bd18c9f 100755 --- a/src/ks-upa +++ b/src/ks-upa @@ -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 @@ -730,8 +731,13 @@ function createConfig() { if [ -f ${dirConfig}/ks-upload-tool ] ; then echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upa -e' for edit)" else - echo "* Setting 'scp' as the default tool" - echo "scp" > ${dirConfig}/ks-upload-tool + 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 diff --git a/src/ks-upf b/src/ks-upf index 92f80b3..150c09d 100755 --- a/src/ks-upf +++ b/src/ks-upf @@ -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 @@ -757,8 +758,13 @@ function createConfig() { if [ -f ${dirConfig}/ks-upload-tool ] ; then echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upf -e' for edit)" else - echo "* Setting 'scp' as the default tool" - echo "scp" > ${dirConfig}/ks-upload-tool + 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 diff --git a/src/ks-upr b/src/ks-upr index 2797938..f6ea43e 100755 --- a/src/ks-upr +++ b/src/ks-upr @@ -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 @@ -616,8 +617,13 @@ function createConfig() { if [ -f ${dirConfig}/ks-upload-tool ] ; then echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upr -e' for edit)" else - echo "* Setting 'scp' as the default tool" - echo "scp" > ${dirConfig}/ks-upload-tool + 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 diff --git a/src/ks-upv b/src/ks-upv index e48b133..12ddad0 100755 --- a/src/ks-upv +++ b/src/ks-upv @@ -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 @@ -730,8 +731,13 @@ function createConfig() { if [ -f ${dirConfig}/ks-upload-tool ] ; then echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upv -e' for edit)" else - echo "* Setting 'scp' as the default tool" - echo "scp" > ${dirConfig}/ks-upload-tool + 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