diff --git a/Makefile b/Makefile index 85bca2c..077e48c 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,10 @@ CFLAGS = -std=gnu99 -pie -fPIC -pedantic -Wno-imports -Wunused -Wno-missing-fiel all: wireguard-mount wireguard-resolve -wireguard-mount: mount-daemon/wireguard-mount.c +wireguard-mount: src/wireguard-mount.c mkdir -p bin - gcc $(CFLAGS) -o bin/wireguard-mount mount-daemon/wireguard-mount.c -lsystemd + gcc $(CFLAGS) -o bin/wireguard-mount src/wireguard-mount.c -lsystemd -wireguard-resolve: resolver/resolve.c resolver/resolve.s +wireguard-resolve: src/resolve.c src/resolve.s mkdir -p bin - gcc -shared -o bin/wireguard-resolve.so -nostdlib -fPIC resolver/resolve.c resolver/resolve.s + gcc -shared -o bin/wireguard-resolve.so -nostdlib -fPIC src/resolve.c src/resolve.s diff --git a/resolver/resolve.c b/src/resolve.c similarity index 100% rename from resolver/resolve.c rename to src/resolve.c diff --git a/resolver/resolve.s b/src/resolve.s similarity index 100% rename from resolver/resolve.s rename to src/resolve.s diff --git a/mount-daemon/wireguard-mount.c b/src/wireguard-mount.c similarity index 100% rename from mount-daemon/wireguard-mount.c rename to src/wireguard-mount.c diff --git a/wireguard-mount.service b/wireguard-mount.service new file mode 100644 index 0000000..a6636e4 --- /dev/null +++ b/wireguard-mount.service @@ -0,0 +1,16 @@ +[Unit] +Description=Wireguard namespace mountpoint +Requires=network.target +After=network.target +RefuseManualStop=true + +[Service] +Type=notify +NotifyAccess=main +RuntimeDirectory=vpn +RuntimeDirectoryMode=0755 +ExecStart=/snacks/wireguard/bin/wireguard-mount +PrivateNetwork=true + +[Install] +WantedBy=multi-user.target