lixonet-ee/build.sh

20 lines
628 B
Bash
Raw Normal View History

2020-04-27 19:55:27 +00:00
#!/bin/sh
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 20:59:19 +00:00
find /etc/tinc/ -type f -name '*.tmpl' | xargs -I '{}' sh -c 'sigil -f {} `cat /etc/lixonet/lixonet.conf | tr '\n' ' '` > `dirname {}`/`basename {} .tmpl`'
2020-04-27 20:56:40 +00:00
find /etc/tinc/ -type f -name '*.tmpl' | xargs -I '{}' rm -f {}
# 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