Skip to content

Commit

Permalink
feature: support run in mac system (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilien1010 authored Jul 30, 2020
1 parent ce1b3a1 commit 8e805f0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions compose/gen-config-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

export etcd_url='http://192.17.5.10:2379'

unamestr=`uname`

wget https://raw.githubusercontent.com/apache/incubator-apisix/master/conf/config.yaml

sed -i -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml
if [[ "$unamestr" == 'Darwin' ]]; then
sed -i '' -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml
sed -i '' -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml
else
sed -i -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml
sed -i -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml
fi


sed -i -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml

mv config.yaml ./apisix_conf/config.yaml

0 comments on commit 8e805f0

Please sign in to comment.