Commit 52118fab authored by nanahira's avatar nanahira

use wg-quick strip

parent 05e93555
...@@ -16,25 +16,15 @@ npm start ...@@ -16,25 +16,15 @@ npm start
cd ansible || exit cd ansible || exit
sed -r -e '/^Address/d' \ _strip_wg_conf() {
-e '/^Fwmark/d' \ sourcePath=$1
-e '/^Table/d' \ targetPath=$2
-e '/^DNS/d' \ tmpFileName=/tmp/$RANDOM.conf
-e '/^MTU/d' \ cp -rf $sourcePath $tmpFileName
-e '/^PostUp/d' \ wg-quick strip $tmpFileName > $targetPath
-e '/^PostDown/d' \ }
-e '/^PreUp/d' \
-e '/^PreDown/d' \ _strip_wg_conf ./protocols/wg/wg.conf.j2 ./protocols/wg/wg-setconf.conf.j2
./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
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
ansible-playbook -i ../result/inventory.yaml "$@" configure.yaml 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