Skip to content

Commit

Permalink
fix: wg-client
Browse files Browse the repository at this point in the history
  • Loading branch information
auricom committed Jun 21, 2024
1 parent 3732aa9 commit 2b47ad2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Containerfile.storage-remote
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY systemd/ucore-update* /etc/systemd/system/
COPY systemd/ucore-firewalld-setup-storage-remote.service /etc/systemd/system/
COPY systemd/ucore-zfs-kernel.service /etc/systemd/system/
COPY systemd/brew* /etc/systemd/system/
COPY systemd/wg-client.service /etc/systemd/system/
COPY systemd/wg0-client.service /etc/systemd/system/

COPY scripts /tmp/

Expand Down
2 changes: 1 addition & 1 deletion scripts/post-install-storage-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ouex pipefail

# Wireguard
systemctl enable wg-client.service
systemctl enable wg0-client.service

# ZFS
systemctl enable ucore-zfs-kernel.service
Expand Down
6 changes: 3 additions & 3 deletions systemd/wg-client.service → systemd/wg0-client.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Description=Wireguard Client
Wants=network-online.target
After=network-online.target
ConditionPathExists=/etc/wireguard/wg0-client.conf
ConditionPathExists=/usr/share/wireguard/wg0-client.sops.conf
Environment=SOPS_AGE_KEY_FILE=/root/.config/sops/age/keys.txt
ExecStartPre=/bin/sh -c 'test -f "${SOPS_AGE_KEY_FILE}" || exit 1'
ExecStartPre=mkdir /etc/wireguard
ExecStartPre=/usr/bin/sops --config /usr/share/sops/.sops.yaml exec-file /usr/share/wireguard/wg0-client.sops.conf "cp {} /etc/wireguard/wg-client.conf ; chmod 400 /etc/wireguard/wg-client.conf"
ExecStartPre=mkdir -p /etc/wireguard
ExecStartPre=/usr/bin/sops --config /usr/share/sops/.sops.yaml exec-file /usr/share/wireguard/wg0-client.sops.conf "cp {} /etc/wireguard/wg0-client.conf ; chmod 400 /etc/wireguard/wg0-client.conf"

[Service]
ExecStart=wg-quick up /etc/wireguard/wg0-client.conf
Expand Down

0 comments on commit 2b47ad2

Please sign in to comment.