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
wangkx1
harbor
Commits
8c9dc81d
Commit
8c9dc81d
authored
Sep 05, 2024
by
wangkx1
Browse files
Delete verify.sh
parent
765d77b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
verify.sh
verify.sh
+0
-26
No files found.
verify.sh
deleted
100644 → 0
View file @
765d77b3
#!/bin/bash
# 1. 添加 10.17.30.230 hygon.ai.com 到 /etc/hosts 文件的末尾
HOST_ENTRY
=
"10.17.30.230 hygon.ai.com"
HOSTS_FILE
=
"/etc/hosts"
if
!
grep
-q
"
$HOST_ENTRY
"
"
$HOSTS_FILE
"
;
then
echo
"
$HOST_ENTRY
"
|
sudo tee
-a
"
$HOSTS_FILE
"
echo
"已添加
$HOST_ENTRY
到
$HOSTS_FILE
"
else
echo
"
$HOST_ENTRY
已存在于
$HOSTS_FILE
中"
fi
# 2. 从远程服务器下载 harbor.crt 文件
REMOTE_USER
=
"root"
REMOTE_HOST
=
"10.17.30.230"
REMOTE_PATH
=
"/home/harbor/key/harbor.crt"
LOCAL_PATH
=
"/usr/local/share/ca-certificates/"
scp
"
$REMOTE_USER
@
$REMOTE_HOST
:
$REMOTE_PATH
"
"
$LOCAL_PATH
"
if
[
$?
-eq
0
]
;
then
echo
"文件已成功下载到
$LOCAL_PATH
"
else
echo
"文件下载失败"
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