lixonet-ee/build.sh

20 lines
642 B
Bash
Raw Normal View History

2020-04-27 21:01:19 +00:00
#!/bin/ash
2020-04-27 20:08:55 +00:00
# Tinc
# Remove existing configuration
2020-04-27 20:36:33 +00:00
rm -v -rf /etc/tinc/*
2020-04-27 20:56:40 +00:00
# Copy all tinc default files to /etc/(tinc)
2020-04-27 20:34:45 +00:00
find tinc -type d | xargs -I '{}' mkdir --verbose -p /etc/{}
2020-04-27 20:56:40 +00:00
find tinc -type f | xargs -I '{}' cp --verbose {} /etc/{}
# Fill out templates and remove them after
2020-04-27 21:21:43 +00:00
find /etc/tinc/ -type f -name '*.tmpl' | xargs -I '{}' sh -c 'sigil -f $1 $(cat /etc/lixonet/lixonet.conf) | tr '\n' ' ') > "$(dirname $1)/$(basename $1 .tmpl)"' -- {}
2020-04-27 21:22:02 +00:00
#find /etc/tinc/ -type f -name '*.tmpl' | xargs -I '{}' rm -f {}
2020-04-27 20:56:40 +00:00
# Copy private key
cp /etc/lixonet/tinc.key /etc/tinc/rsa_key.priv
# Bird
rm -rf /etc/bird/*
2020-04-27 20:08:55 +00:00
docker-compose up -d --build