Setting scp-pem as default when select certificate (ks-upv/upa/upf/upr)
This commit is contained in:
parent
5c384a0350
commit
8c39912218
12
src/ks-upa
12
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
|
||||
|
|
12
src/ks-upf
12
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
|
||||
|
|
12
src/ks-upr
12
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
|
||||
|
|
12
src/ks-upv
12
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user