dn42-ansible/mkpeerpsk.sh
2025-01-25 15:43:41 -08:00

7 lines
No EOL
153 B
Bash

#!/bin/bash
set -x
cd /etc/systemd/network && \
wg genpsk > "$1".psk && \
chmod o-rwx "$1".psk && \
chown root:systemd-network "$1".psk && \
cat "$1".psk