mirror of https://github.com/k3s-io/k3s
fixed regex error, which replace 2 line in template file
parent
33239c1e6f
commit
b038355c81
|
@ -29,7 +29,7 @@ while read -ra LINE; do
|
|||
sed -i -e "s|^bind.*$|bind ${LINE}|" ${CFG}
|
||||
elif [ "$(/opt/redis/redis-cli -h $LINE info | grep role | sed 's,\r$,,')" = "role:master" ]; then
|
||||
# TODO: More restrictive regex?
|
||||
sed -i -e "s|^.*slaveof.*$|slaveof ${LINE} ${PORT}|" ${CFG}
|
||||
sed -i -e "s|^# slaveof.*$|slaveof ${LINE} ${PORT}|" ${CFG}
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue