dn42-ansible/mkpeerkey.sh

6 lines
No EOL
158 B
Bash

#!/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