Fix bug.
This commit is contained in:
parent
07721eaa30
commit
0776ba723d
|
@ -131,7 +131,7 @@ else
|
|||
if [[ "$(dirname $org_ssl_dir)" == "/etc/letsencrypt/live" ]] && [[ ! -z "$(sudo_command find $org_ssl_dir -name '*.pem' 2>>/dev/null || echo '')" ]]; then
|
||||
sudo_command mkdir -p /etc/letsencrypt/archive/$real_domain
|
||||
sudo_command rm -f /etc/letsencrypt/archive/$real_domain/*.pem
|
||||
sudo_command mv $org_ssl_dir/*.pem /etc/letsencrypt/archive/$real_domain/.
|
||||
sudo_command find $org_ssl_dir -name '*.pem' -exec mv {} /etc/letsencrypt/archive/$real_domain/. \;
|
||||
if [[ ! -z "$certbot_file_idx" ]]; then
|
||||
sudo_command bash -l -c "find '/etc/letsencrypt/archive/$real_domain' -regex '[^0-9]+\.pem' -printf '%p\0'| perl -0 -l0 -pe 'print \$_; s/($(echo /etc/letsencrypt/archive/$real_domain/|sed 's/[\.\/]/\\\0/g')[^\d]+)\.pem/\${1}'$certbot_file_idx'\.pem/'| xargs -0 -n 2 mv"
|
||||
sudo_command bash -l -c "cd $org_ssl_dir && find '../../archive/$real_domain/' -regex '[^0-9]+$certbot_file_idx\.pem' -printf '%p\0'| perl -0 -l0 -pe 'print \$_; s/$(echo ../../archive/$real_domain/|sed 's/[\.\/]/\\\0/g')([^\d]+)$certbot_file_idx\.pem/\${1}\.pem/'| xargs -0 -n 2 ln -s"
|
||||
|
|
|
@ -135,7 +135,7 @@ else
|
|||
if [[ "$(dirname $org_ssl_dir)" == "/etc/letsencrypt/live" ]] && [[ ! -z "$(sudo_command find $org_ssl_dir -name '*.pem' 2>>/dev/null || echo '')" ]]; then
|
||||
sudo_command mkdir -p /etc/letsencrypt/archive/$real_domain
|
||||
sudo_command rm -f /etc/letsencrypt/archive/$real_domain/*.pem
|
||||
sudo_command mv $org_ssl_dir/*.pem /etc/letsencrypt/archive/$real_domain/.
|
||||
sudo_command find $org_ssl_dir -name '*.pem' -exec mv {} /etc/letsencrypt/archive/$real_domain/. \;
|
||||
if [[ ! -z "$certbot_file_idx" ]]; then
|
||||
sudo_command bash -l -c "find '/etc/letsencrypt/archive/$real_domain' -regex '[^0-9]+\.pem' -printf '%p\0'| perl -0 -l0 -pe 'print \$_; s/($(echo /etc/letsencrypt/archive/$real_domain/|sed 's/[\.\/]/\\\0/g')[^\d]+)\.pem/\${1}'$certbot_file_idx'\.pem/'| xargs -0 -n 2 mv"
|
||||
sudo_command bash -l -c "cd $org_ssl_dir && find '../../archive/$real_domain/' -regex '[^0-9]+$certbot_file_idx\.pem' -printf '%p\0'| perl -0 -l0 -pe 'print \$_; s/$(echo ../../archive/$real_domain/|sed 's/[\.\/]/\\\0/g')([^\d]+)$certbot_file_idx\.pem/\${1}\.pem/'| xargs -0 -n 2 ln -s"
|
||||
|
|
Loading…
Reference in New Issue