cd_ca
This commit is contained in:
parent
b4abe18a03
commit
c068a571e6
1 changed files with 14 additions and 4 deletions
18
cd.sh
18
cd.sh
|
@ -35,9 +35,18 @@ cd_main () {
|
|||
# steps
|
||||
|
||||
cd_set_environment_variables () {
|
||||
local variable
|
||||
local index
|
||||
local text
|
||||
cd_step "Set environment variables"
|
||||
#
|
||||
index=1
|
||||
eval "text=\"\${CD_CA_${index}}\""
|
||||
while [ "${text}" ] ; do
|
||||
CD_CA=${index}
|
||||
index=$((index+1))
|
||||
eval "text=\"\${CD_CA_${index}}\""
|
||||
done
|
||||
#
|
||||
case "$(cd_grep_os ID)" in
|
||||
"debian")
|
||||
CD_OS_ID="${CD_OS_DEBIAN}"
|
||||
|
@ -101,6 +110,8 @@ local variable
|
|||
CD_PROJECTS_URL="${CD_SERVER_URL}/${CD_PROJECTS_GROUP}"
|
||||
CD_PROJECT_URL="${CD_PROJECTS_URL}/${CD_PROJECT_NAME}"
|
||||
#
|
||||
cd_echo "CD_CA"
|
||||
cd_split
|
||||
cd_echo "CD_OS_ID" "CD_OS_VERSION"
|
||||
cd_split
|
||||
cd_echo "CD_DNS_FILE"
|
||||
|
@ -170,12 +181,11 @@ local text
|
|||
cd_step "Copy CA"
|
||||
cd_mkdir "${CD_CA_ROOT}"
|
||||
index=1
|
||||
eval "text=\${CD_CA_${index}}"
|
||||
eval "text=\"\${CD_CA_${index}}\""
|
||||
while [ "${text}" ] ; do
|
||||
cd_write "${CD_CA_ROOT}/${index}.crt" "${text}"
|
||||
CD_CA=$((CD_CA+1))
|
||||
index=$((index+1))
|
||||
eval "text=\${CD_CA_${index}}"
|
||||
eval "text=\"\${CD_CA_${index}}\""
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue