Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
f90cbb63
Commit
f90cbb63
authored
May 14, 2022
by
PM Extra
Browse files
fix format
parent
c8929ca0
Changes
2
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
f90cbb63
...
@@ -2349,7 +2349,7 @@ _migratedomainconf() {
...
@@ -2349,7 +2349,7 @@ _migratedomainconf() {
#_migratedeployconf oldkey newkey base64encode
#_migratedeployconf oldkey newkey base64encode
_migratedeployconf
()
{
_migratedeployconf
()
{
_migratedomainconf
"
$1
"
"SAVED_
$2
"
"
$3
"
||
_migratedomainconf
"
$1
"
"SAVED_
$2
"
"
$3
"
||
_migratedomainconf
"SAVED_
$1
"
"SAVED_
$2
"
"
$3
"
# try only when oldkey itself is not found
_migratedomainconf
"SAVED_
$1
"
"SAVED_
$2
"
"
$3
"
# try only when oldkey itself is not found
}
}
#key value base64encode
#key value base64encode
...
...
deploy/ssh.sh
View file @
f90cbb63
...
@@ -186,8 +186,8 @@ _ssh_deploy() {
...
@@ -186,8 +186,8 @@ _ssh_deploy() {
_local_full_file
=
""
_local_full_file
=
""
case
$DEPLOY_SSH_SERVER
in
case
$DEPLOY_SSH_SERVER
in
(
*
:
*
)
_host
=
${
DEPLOY_SSH_SERVER
%
:
*
}
_port
=
${
DEPLOY_SSH_SERVER
##*
:
}
;;
*
:
*
)
_host
=
${
DEPLOY_SSH_SERVER
%
:
*
}
_port
=
${
DEPLOY_SSH_SERVER
##*
:
}
;;
(
*
)
_host
=
$DEPLOY_SSH_SERVER
_port
=
;;
*
)
_host
=
$DEPLOY_SSH_SERVER
_port
=
;;
esac
esac
_info
"Deploy certificates to remote server
$DEPLOY_SSH_USER
@
$_host
:
$_port
"
_info
"Deploy certificates to remote server
$DEPLOY_SSH_USER
@
$_host
:
$_port
"
...
@@ -265,9 +265,9 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
...
@@ -265,9 +265,9 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
# scp the file
# scp the file
_local_cert_file
=
$(
_mktemp
)
_local_cert_file
=
$(
_mktemp
)
if
[
"
$DEPLOY_SSH_CERTFILE
"
=
"
$DEPLOY_SSH_KEYFILE
"
]
;
then
if
[
"
$DEPLOY_SSH_CERTFILE
"
=
"
$DEPLOY_SSH_KEYFILE
"
]
;
then
cat
"
$_ckey
"
>>
"
$_local_cert_file
"
cat
"
$_ckey
"
>>
"
$_local_cert_file
"
fi
fi
cat
"
$_ccert
"
>>
"
$_local_cert_file
"
cat
"
$_ccert
"
>>
"
$_local_cert_file
"
if
!
_scp_remote_cmd
"
$_local_cert_file
"
"
$DEPLOY_SSH_CERTFILE
"
;
then
if
!
_scp_remote_cmd
"
$_local_cert_file
"
"
$DEPLOY_SSH_CERTFILE
"
;
then
return
$_err_code
return
$_err_code
fi
fi
...
@@ -306,10 +306,10 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
...
@@ -306,10 +306,10 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
# scp the file
# scp the file
_local_ca_file
=
$(
_mktemp
)
_local_ca_file
=
$(
_mktemp
)
if
[
"
$DEPLOY_SSH_CAFILE
"
=
"
$DEPLOY_SSH_KEYFILE
"
]
;
then
if
[
"
$DEPLOY_SSH_CAFILE
"
=
"
$DEPLOY_SSH_KEYFILE
"
]
;
then
cat
"
$_ckey
"
>>
"
$_local_ca_file
"
cat
"
$_ckey
"
>>
"
$_local_ca_file
"
fi
fi
if
[
"
$DEPLOY_SSH_CAFILE
"
=
"
$DEPLOY_SSH_CERTFILE
"
]
;
then
if
[
"
$DEPLOY_SSH_CAFILE
"
=
"
$DEPLOY_SSH_CERTFILE
"
]
;
then
cat
"
$_ccert
"
>>
"
$_local_ca_file
"
cat
"
$_ccert
"
>>
"
$_local_ca_file
"
fi
fi
cat
"
$_cca
"
>>
"
$_local_ca_file
"
cat
"
$_cca
"
>>
"
$_local_ca_file
"
if
!
_scp_remote_cmd
"
$_local_ca_file
"
"
$DEPLOY_SSH_CAFILE
"
;
then
if
!
_scp_remote_cmd
"
$_local_ca_file
"
"
$DEPLOY_SSH_CAFILE
"
;
then
...
@@ -351,15 +351,15 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
...
@@ -351,15 +351,15 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
# scp the file
# scp the file
_local_full_file
=
$(
_mktemp
)
_local_full_file
=
$(
_mktemp
)
if
[
"
$DEPLOY_SSH_FULLCHAIN
"
=
"
$DEPLOY_SSH_KEYFILE
"
]
;
then
if
[
"
$DEPLOY_SSH_FULLCHAIN
"
=
"
$DEPLOY_SSH_KEYFILE
"
]
;
then
cat
"
$_ckey
"
>>
"
$_local_full_file
"
cat
"
$_ckey
"
>>
"
$_local_full_file
"
fi
fi
if
[
"
$DEPLOY_SSH_FULLCHAIN
"
=
"
$DEPLOY_SSH_CERTFILE
"
]
;
then
if
[
"
$DEPLOY_SSH_FULLCHAIN
"
=
"
$DEPLOY_SSH_CERTFILE
"
]
;
then
cat
"
$_ccert
"
>>
"
$_local_full_file
"
cat
"
$_ccert
"
>>
"
$_local_full_file
"
fi
fi
if
[
"
$DEPLOY_SSH_FULLCHAIN
"
=
"
$DEPLOY_SSH_CAFILE
"
]
;
then
if
[
"
$DEPLOY_SSH_FULLCHAIN
"
=
"
$DEPLOY_SSH_CAFILE
"
]
;
then
cat
"
$_cca
"
>>
"
$_local_full_file
"
cat
"
$_cca
"
>>
"
$_local_full_file
"
fi
fi
cat
"
$_cfullchain
"
>>
"
$_local_full_file
"
cat
"
$_cfullchain
"
>>
"
$_local_full_file
"
if
!
_scp_remote_cmd
"
$_local_full_file
"
"
$DEPLOY_SSH_FULLCHAIN
"
;
then
if
!
_scp_remote_cmd
"
$_local_full_file
"
"
$DEPLOY_SSH_FULLCHAIN
"
;
then
return
$_err_code
return
$_err_code
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment