这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions plugins/certs/commands
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ is_tar_import() {
}

is_file_import() {
local CRT_FILE="$3"
local KEY_FILE="$4"

if [[ -f $CRT_FILE ]] && [[ -f $KEY_FILE ]]; then
return 0
local CRT_FILE="$1"
local KEY_FILE="$2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see the fix now!!!


if [[ $CRT_FILE ]] && [[ $KEY_FILE ]]; then
if [[ ! -f $CRT_FILE ]]; then
dokku_log_fail "CRT file specified not found, please check file paths"
elif [[ ! -f $KEY_FILE ]]; then
dokku_log_fail "KEY file specified not found, please check file paths"
else
return 0
fi
fi

return 1
Expand Down Expand Up @@ -55,8 +61,8 @@ certs_set() {
fi

mkdir -p "$DOKKU_ROOT/$APP/tls"
mv "$CRT_FILE" "$DOKKU_ROOT/$APP/tls/server.crt"
mv "$KEY_FILE" "$DOKKU_ROOT/$APP/tls/server.key"
cp "$CRT_FILE" "$DOKKU_ROOT/$APP/tls/server.crt"
cp "$KEY_FILE" "$DOKKU_ROOT/$APP/tls/server.key"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suppose it doesn't matter as $TEMP_DIR get removed but why change to cp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelshobbs no you tell me, why you delete my certs bro? That was my only copy!!! 😉

cd $DOKKU_ROOT
rm -rf $TEMP_DIR
nginx_build_config $APP
Expand Down