mirror of https://github.com/k3s-io/k3s
fix shellcheck failures of test/images/pets/redis-installer/on-start.sh
parent
be374388f6
commit
b732a53c6b
|
@ -98,7 +98,6 @@
|
||||||
./test/e2e_node/environment/setup_host.sh
|
./test/e2e_node/environment/setup_host.sh
|
||||||
./test/e2e_node/gubernator.sh
|
./test/e2e_node/gubernator.sh
|
||||||
./test/images/image-util.sh
|
./test/images/image-util.sh
|
||||||
./test/images/pets/redis-installer/on-start.sh
|
|
||||||
./test/images/pets/zookeeper-installer/install.sh
|
./test/images/pets/zookeeper-installer/install.sh
|
||||||
./test/images/pets/zookeeper-installer/on-start.sh
|
./test/images/pets/zookeeper-installer/on-start.sh
|
||||||
./test/images/volume/gluster/run_gluster.sh
|
./test/images/volume/gluster/run_gluster.sh
|
||||||
|
|
|
@ -27,7 +27,7 @@ PORT=6379
|
||||||
while read -ra LINE; do
|
while read -ra LINE; do
|
||||||
if [[ "${LINE}" == *"${HOSTNAME}"* ]]; then
|
if [[ "${LINE}" == *"${HOSTNAME}"* ]]; then
|
||||||
sed -i -e "s|^bind.*$|bind ${LINE}|" ${CFG}
|
sed -i -e "s|^bind.*$|bind ${LINE}|" ${CFG}
|
||||||
elif [ "$(/opt/redis/redis-cli -h $LINE info | grep role | sed 's,\r$,,')" = "role:master" ]; then
|
elif [ "$(/opt/redis/redis-cli -h "${LINE}" info | grep role | sed 's,\r$,,')" = "role:master" ]; then
|
||||||
# TODO: More restrictive regex?
|
# TODO: More restrictive regex?
|
||||||
sed -i -e "s|^# slaveof.*$|slaveof ${LINE} ${PORT}|" ${CFG}
|
sed -i -e "s|^# slaveof.*$|slaveof ${LINE} ${PORT}|" ${CFG}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue