Browse Source

Update ssh.sh

pull/3674/head
fradev 3 years ago
parent
commit
613475ac26
  1. 18
      deploy/ssh.sh

18
deploy/ssh.sh

@ -237,8 +237,8 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
# if filename is same as previous file then append.
_pipe=">>"
_local_cert_file=$(_mktemp)
cat $_ckey > $_local_cert_file
cat $_ccert >> $_local_cert_file
cat "$_ckey" > "$_local_cert_file"
cat "$_ccert" >> "$_local_cert_file"
elif [ "$Le_Deploy_ssh_backup" = "yes" ]; then
# backup file we are about to overwrite.
_cmdstr="$_cmdstr cp $Le_Deploy_ssh_certfile $_backupdir >/dev/null;"
@ -344,15 +344,15 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
_pipe=">>"
_local_full_file=$(_mktemp)
if [ "$Le_Deploy_ssh_fullchain" = "$Le_Deploy_ssh_keyfile" ] ; then
cat $_ckey >> $_local_full_file
cat "$_ckey" >> "$_local_full_file"
fi
if [ "$Le_Deploy_ssh_fullchain" = "$Le_Deploy_ssh_certfile" ]; then
cat $_ccert >> $_local_full_file
cat "$_ccert" >> "$_local_full_file"
fi
if [ "$Le_Deploy_ssh_fullchain" = "$Le_Deploy_ssh_cafile" ]; then
cat $_cca >> $_local_full_file
cat "$_cca" >> "$_local_full_file"
fi
cat $_cfullchain >> $_local_full_file
cat "$_cfullchain" >> "$_local_full_file"
elif [ "$Le_Deploy_ssh_backup" = "yes" ]; then
# backup file we are about to overwrite.
@ -390,13 +390,13 @@ then rm -rf \"\$fn\"; echo \"Backup \$fn deleted as older than 180 days\"; fi; d
# cleanup local files if any
if [ -n "$_local_cert_file" ]; then
rm $_local_cert_file > /dev/null 1>&2
rm "$_local_cert_file" > /dev/null 1>&2
fi
if [ -n "$_local_ca_file" ]; then
rm $_local_ca_file > /dev/null 1>&2
rm "$_local_ca_file" > /dev/null 1>&2
fi
if [ -n "$_local_full_file" ]; then
rm $_local_full_file > /dev/null 1>&2
rm "$_local_full_file" > /dev/null 1>&2
fi

Loading…
Cancel
Save