-
Notifications
You must be signed in to change notification settings - Fork 6
/
namespaced-wireguard-vpn.spec.rpkg
60 lines (44 loc) · 1.56 KB
/
namespaced-wireguard-vpn.spec.rpkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Name: {{{ git_dir_name }}}
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Systemd configuration for a network namespace containing a WireGuard VPN connection
License: MIT
VCS: {{{ git_dir_vcs }}}
Source: {{{ git_dir_pack }}}
BuildRequires: systemd-rpm-macros
Requires: bash, findutils, iproute, systemd, wireguard-tools
BuildArch: noarch
%description
This package contains configuration for Systemd to create and manage a network
namespace containing a WireGuard VPN connection.
namespaced-wireguard-vpn.target:
namespaced-wireguard-vpn-netns.service:
Creates the network namespace
namespaced-wireguard-vpn-interface.service:
Creates the WireGuard connection and moves it into the namespace
namespaced-wireguard-vpn-tunnel.service:
Creates a Veth tunnel into the namespace
%prep
{{{ git_dir_setup_macro }}}
%install
install --mode=755 --directory %{buildroot}%{_sbindir}
install --mode=755 --target-directory=%{buildroot}%{_sbindir} bin/*
install --mode=700 --directory %{buildroot}%{_sysconfdir}/%{name}
install --mode=600 --target-directory=%{buildroot}%{_sysconfdir}/%{name} conf/*
install --mode=755 --directory %{buildroot}%{_unitdir}
install --mode=644 --target-directory=%{buildroot}%{_unitdir} systemd/*
%post
%systemd_post namespaced-wireguard-vpn.target
%preun
%systemd_preun namespaced-wireguard-vpn.target
%postun
%systemd_postun namespaced-wireguard-vpn.target
%files
%license LICENSE
%{_sbindir}/*
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*
%{_unitdir}/*
%changelog
{{{ git_dir_changelog }}}
# vim: syntax=spec