You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
292 B
Makefile

dest:={{ global_wireguard_configuration_link_name }}
peer_files:=$(sort $(wildcard peers/*))
${dest}/wireguard.cfg: main.cfg ${peer_files}
cat $^ | sed '0,/<PRIVATEKEY>/{s#<PRIVATEKEY>#'"$$(cat {{ wireguard_private_key | quote }})"'#}' > "$@"
chown root:root "$@"
chmod u=rw,g=r,o= "$@"