Commit 5cc497c7 by tingweiwang

修复sed-upper脚本必须在相对路径下执行

1 parent a09e0b5a
Showing with 13 additions and 8 deletions
#!/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
...@@ -6,25 +6,25 @@ PUBLIC_IP=106.38.203.205 ...@@ -6,25 +6,25 @@ PUBLIC_IP=106.38.203.205
INTRANET_IP=192.168.1.32 INTRANET_IP=192.168.1.32
function seetaas_sed() { function seetaas_sed() {
sed -i s/PUBLIC_IP/$PUBLIC_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 seetaas/2-replace-file.sh sed -i s/INTRANET_IP/$INTRANET_IP/g /root/k8s/script/seetaas/2-replace-file.sh
} }
function autodl_sed() { function autodl_sed() {
sed -i s/PUBLIC_IP/$PUBLIC_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 autodl/2-replace-file.sh sed -i s/INTRANET_IP/$INTRANET_IP/g /root/k8s/script/autodl/2-replace-file.sh
} }
function seetaas_recover() { function seetaas_recover() {
sed -i s/$PUBLIC_IP/PUBLIC_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 seetaas/2-replace-file.sh sed -i s/$INTRANET_IP/INTRANET_IP/g /root/k8s/script/seetaas/2-replace-file.sh
} }
function autodl_recover() { function autodl_recover() {
sed -i s/$PUBLIC_IP/PUBLIC_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 autodl/2-replace-file.sh sed -i s/$INTRANET_IP/INTRANET_IP/g /root/k8s/script/autodl/2-replace-file.sh
} }
case $1 in case $1 in
seetaas_sed) seetaas_sed)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!