Add extra target to makefile

This commit is contained in:
Roy Olav Purser 2024-02-09 00:21:40 +01:00
parent dedaf9d8ef
commit 266bac7e21
Signed by: roypur
GPG Key ID: 063DAA01D56E28CB

View File

@ -10,16 +10,21 @@ wireguard_resolve: src/resolve.c src/resolve.s
mkdir -p bin
gcc -shared -o bin/wireguard-resolve.so -nostdlib -fPIC src/resolve.c src/resolve.s
install_basic: systemd scripts bin
install_mount: systemd bin:
mkdir -p /snacks/wireguard/bin
mkdir -p /snacks/wireguard/scripts
cp bin/wireguard-resolve.so /snacks/wireguard/bin/wireguard-resolve.so
cp bin/wireguard-mount /snacks/wireguard/bin/wireguard-mount
cp systemd/vpnclient-wg-basic.service /etc/systemd/system/vpnclient-wg-basic.service
cp systemd/wireguard-mount.service /etc/systemd/system/wireguard-mount.service
cp scripts/connect_basic.py /snacks/wireguard/scripts/connect_basic.py
cp scripts/inner_basic.sh /snacks/wireguard/scripts/inner_basic.sh
chmod -R 755 /snacks/wireguard
systemctl daemon-reload
systemctl enable wireguard-mount
systemctl start wireguard-mount
install_basic: systemd scripts bin
mkdir -p /snacks/wireguard/bin
mkdir -p /snacks/wireguard/scripts
cp bin/wireguard-resolve.so /snacks/wireguard/bin/wireguard-resolve.so
cp systemd/vpnclient-wg-basic.service /etc/systemd/system/vpnclient-wg-basic.service
cp scripts/connect_basic.py /snacks/wireguard/scripts/connect_basic.py
cp scripts/inner_basic.sh /snacks/wireguard/scripts/inner_basic.sh
chmod -R 755 /snacks/wireguard
systemctl daemon-reload