Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
50d7b845
Commit
50d7b845
authored
Feb 12, 2017
by
neil
Committed by
GitHub
Feb 12, 2017
Browse files
Merge pull request #611 from Neilpang/backup
Backup
parents
a6feb0a8
d88f8e86
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
50d7b845
...
...
@@ -2059,6 +2059,10 @@ _initpath() {
_debug DOMAIN_PATH "$DOMAIN_PATH"
fi
if [ -z "$DOMAIN_BACKUP_PATH" ]; then
DOMAIN_BACKUP_PATH="$DOMAIN_PATH/backup"
fi
if [ -z "$DOMAIN_CONF" ]; then
DOMAIN_CONF="$DOMAIN_PATH/$domain.conf"
fi
...
...
@@ -3612,7 +3616,8 @@ _installcert() {
_info "Installing cert to:$Le_RealCertPath"
if [ -f "$Le_RealCertPath" ] && [ ! "$IS_RENEW" ]; then
cp "$Le_RealCertPath" "$Le_RealCertPath".bak
mkdir -p "$DOMAIN_BACKUP_PATH"
cp "$Le_RealCertPath" "$DOMAIN_BACKUP_PATH/cert.bak"
fi
cat "$CERT_PATH" >"$Le_RealCertPath"
fi
...
...
@@ -3625,7 +3630,8 @@ _installcert() {
cat "$CA_CERT_PATH" >>"$Le_RealCACertPath"
else
if [ -f "$Le_RealCACertPath" ] && [ ! "$IS_RENEW" ]; then
cp "$Le_RealCACertPath" "$Le_RealCACertPath".bak
mkdir -p "$DOMAIN_BACKUP_PATH"
cp "$Le_RealCACertPath" "$DOMAIN_BACKUP_PATH/ca.bak"
fi
cat "$CA_CERT_PATH" >"$Le_RealCACertPath"
fi
...
...
@@ -3635,7 +3641,8 @@ _installcert() {
_info "Installing key to:$Le_RealKeyPath"
if [ -f "$Le_RealKeyPath" ] && [ ! "$IS_RENEW" ]; then
cp "$Le_RealKeyPath" "$Le_RealKeyPath".bak
mkdir -p "$DOMAIN_BACKUP_PATH"
cp "$Le_RealKeyPath" "$DOMAIN_BACKUP_PATH/key.bak"
fi
cat "$CERT_KEY_PATH" >"$Le_RealKeyPath"
fi
...
...
@@ -3644,7 +3651,8 @@ _installcert() {
_info "Installing full chain to:$Le_RealFullChainPath"
if [ -f "$Le_RealFullChainPath" ] && [ ! "$IS_RENEW" ]; then
cp "$Le_RealFullChainPath" "$Le_RealFullChainPath".bak
mkdir -p "$DOMAIN_BACKUP_PATH"
cp "$Le_RealFullChainPath" "$DOMAIN_BACKUP_PATH/fullchain.bak"
fi
cat "$CERT_FULLCHAIN_PATH" >"$Le_RealFullChainPath"
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