Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
k8s
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5cc497c7
authored
Aug 25, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复sed-upper脚本必须在相对路径下执行
1 parent
a09e0b5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
script/check/1.sh
script/sed-upper.sh
script/check/1.sh
0 → 100755
View file @
5cc497c
#!/bin/bash
etcdctl --endpoints
=
https://
$1
:2379,https://
$2
:2379,https://
$3
:2379
\
--ca-file
=
/opt/kubernetes/ssl/ca.pem
\
--cert-file
=
/opt/kubernetes/ssl/etcd.pem
\
--key-file
=
/opt/kubernetes/ssl/etcd-key.pem endpoint status
script/sed-upper.sh
View file @
5cc497c
...
...
@@ -6,25 +6,25 @@ PUBLIC_IP=106.38.203.205
INTRANET_IP
=
192.168.1.32
function
seetaas_sed
()
{
sed -i s/PUBLIC_IP/
$PUBLIC_IP
/g seetaas/2-replace-file.sh
sed -i s/INTRANET_IP/
$INTRANET_IP
/g seetaas/2-replace-file.sh
sed -i s/PUBLIC_IP/
$PUBLIC_IP
/g
/root/k8s/script/
seetaas/2-replace-file.sh
sed -i s/INTRANET_IP/
$INTRANET_IP
/g
/root/k8s/script/
seetaas/2-replace-file.sh
}
function
autodl_sed
()
{
sed -i s/PUBLIC_IP/
$PUBLIC_IP
/g autodl/2-replace-file.sh
sed -i s/INTRANET_IP/
$INTRANET_IP
/g autodl/2-replace-file.sh
sed -i s/PUBLIC_IP/
$PUBLIC_IP
/g
/root/k8s/script/
autodl/2-replace-file.sh
sed -i s/INTRANET_IP/
$INTRANET_IP
/g
/root/k8s/script/
autodl/2-replace-file.sh
}
function
seetaas_recover
()
{
sed -i s/
$PUBLIC_IP
/PUBLIC_IP/g seetaas/2-replace-file.sh
sed -i s/
$INTRANET_IP
/INTRANET_IP/g seetaas/2-replace-file.sh
sed -i s/
$PUBLIC_IP
/PUBLIC_IP/g
/root/k8s/script/
seetaas/2-replace-file.sh
sed -i s/
$INTRANET_IP
/INTRANET_IP/g
/root/k8s/script/
seetaas/2-replace-file.sh
}
function
autodl_recover
()
{
sed -i s/
$PUBLIC_IP
/PUBLIC_IP/g autodl/2-replace-file.sh
sed -i s/
$INTRANET_IP
/INTRANET_IP/g autodl/2-replace-file.sh
sed -i s/
$PUBLIC_IP
/PUBLIC_IP/g
/root/k8s/script/
autodl/2-replace-file.sh
sed -i s/
$INTRANET_IP
/INTRANET_IP/g
/root/k8s/script/
autodl/2-replace-file.sh
}
case
$1
in
seetaas_sed
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment