Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fca32d7f5c |
@ -285,7 +285,7 @@ section "Creating wireguard conf"
|
||||
if [ -n "$wireguard_number" ] ; then
|
||||
run cat >> "$mnt/etc/wireguard/jeancloud.conf" <<EOF
|
||||
[Interface]
|
||||
PrivateKey = $(wg genkey)
|
||||
PrivateKey = $(chroot_run wg genkey)
|
||||
ListenPort = 51812
|
||||
Address = 10.98.1.$wireguard_number/32
|
||||
|
||||
@ -295,7 +295,7 @@ AllowedIPs = 10.98.1.254/32
|
||||
Endpoint = 193.33.56.94:51812
|
||||
PersistentKeepalive = 25
|
||||
EOF
|
||||
wireguard_pubkey="$(cat "$mnt/etc/wireguard/jeancloud.conf" | grep -oP '^PrivateKey = \K.*' | wg pubkey)"
|
||||
wireguard_pubkey="$(cat "$mnt/etc/wireguard/jeancloud.conf" | grep -oP '^PrivateKey = \K.*' | chroot_run wg pubkey)"
|
||||
|
||||
run cat > "$secret_dir/wg_conf_part" <<EOF
|
||||
[Peer] # $hostname
|
||||
|
Loading…
Reference in New Issue
Block a user