Commit 52118fab authored by nanahira's avatar nanahira

use wg-quick strip

parent 05e93555
......@@ -16,25 +16,15 @@ npm start
cd ansible || exit
sed -r -e '/^Address/d' \
-e '/^Fwmark/d' \
-e '/^Table/d' \
-e '/^DNS/d' \
-e '/^MTU/d' \
-e '/^PostUp/d' \
-e '/^PostDown/d' \
-e '/^PreUp/d' \
-e '/^PreDown/d' \
./protocols/wg/wg.conf.j2 > ./protocols/wg/wg-setconf.conf.j2
sed -r -e '/^Address/d' \
-e '/^Fwmark/d' \
-e '/^Table/d' \
-e '/^DNS/d' \
-e '/^MTU/d' \
-e '/^PostUp/d' \
-e '/^PostDown/d' \
-e '/^PreUp/d' \
-e '/^PreDown/d' \
./protocols/wgfrp/wgfrp.conf.j2 > ./protocols/wgfrp/wgfrp-setconf.conf.j2
_strip_wg_conf() {
sourcePath=$1
targetPath=$2
tmpFileName=/tmp/$RANDOM.conf
cp -rf $sourcePath $tmpFileName
wg-quick strip $tmpFileName > $targetPath
}
_strip_wg_conf ./protocols/wg/wg.conf.j2 ./protocols/wg/wg-setconf.conf.j2
_strip_wg_conf ./protocols/wgfrp/wgfrp.conf.j2 ./protocols/wgfrp/wgfrp-setconf.conf.j2
ansible-playbook -i ../result/inventory.yaml "$@" configure.yaml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment