dn42-ansible/mkpeerkey.sh

6 lines
158 B
Bash
Raw Normal View History

2025-01-25 20:47:55 +00:00
#!/bin/bash
set -x
cd /etc/systemd/network && \
wg genkey|tee "$1".key|wg pubkey > "$1".pub && \
chmod o-rwx "$1".key && \
chown root:systemd-network "$1".key