16 lines
598 B
Bash
Executable file
16 lines
598 B
Bash
Executable file
#!/bin/bash
|
|
|
|
grep -Fq 'network: ""' runner-data/config.yml ;
|
|
if [[ $? -ne 0 ]] ; then
|
|
echo "Already modified config file!"
|
|
set -e
|
|
exit 1
|
|
fi
|
|
|
|
sed -i -e "s|network: .*|network: host|" runner-data/config.yml ;
|
|
sed -i -e "s|^ envs:\$| envs:\n DOCKER_HOST: tcp://docker:2376\n DOCKER_TLS_VERIFY: 1\n DOCKER_CERT_PATH: /certs/client|" runner-data/config.yml ;
|
|
sed -i -e "s|^ options:| options: -v /certs/client:/certs/client|" runner-data/config.yml ;
|
|
sed -i -e "s| valid_volumes: \[\]\$| valid_volumes:\n - /certs/client|" runner-data/config.yml ;
|
|
|
|
echo "Updated config file."
|
|
|