Skip to content

Commit 6ac41f4

Browse files
authored
fix: mv config.yml to config-default.yml in the latest version of apisix (#72)
* fix: mv config.yml to config-default.yml in the latest version of apisix * fix: wget output config.yaml * fix: wget -O * fix: bad indentation
1 parent 71be19e commit 6ac41f4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

example/gen-config-yaml.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
export etcd_url='http://172.18.5.10:2379'
44

5-
wget https://raw.githubusercontent.com/apache/apisix/master/conf/config.yaml
6-
7-
sed -i -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml
8-
9-
sed -i -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml
5+
wget https://raw.githubusercontent.com/apache/apisix/master/conf/config-default.yaml -O config.yaml
6+
7+
if [[ "$unamestr" == 'Darwin' ]]; then
8+
sed -i '' -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml
9+
sed -i '' -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml
10+
else
11+
sed -i -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml
12+
sed -i -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml
13+
fi
1014

1115
mv config.yaml ./apisix_conf/config.yaml

0 commit comments

Comments
 (0)