From 9691c35f9e8efa978dce17954212ebee8dc55ce3 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 29 Dec 2025 07:27:15 +0000 Subject: automatic import of tunsafe --- tunsafe.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tunsafe.spec') diff --git a/tunsafe.spec b/tunsafe.spec index d1afa6c..b85b7df 100644 --- a/tunsafe.spec +++ b/tunsafe.spec @@ -25,8 +25,7 @@ make %install install -Dm755 %{name} %{buildroot}/%{_bindir}/%{name} - -mkdir -p %{buildroot}%{_sysconfdir}/%{name} +install -Dm755 installer/TunSafe.conf %{buildroot}%{_sysconfdir}/%{name}/TunSafe.conf mkdir -p %{buildroot}%{_unitdir} cat > %{buildroot}%{_unitdir}/tunsafe@.service << 'EOF' @@ -40,6 +39,9 @@ Type=simple ExecStart=/usr/bin/tunsafe start -n %i /etc/tunsafe/%i.conf ExecStop=/usr/bin/tunsafe stop %i Restart=on-failure +RestartSec=5 +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE [Install] WantedBy=multi-user.target @@ -47,9 +49,10 @@ EOF %files %license LICENSE.AGPL.TXT installer/LICENSE.TXT -%doc docs/*txt installer/TunSafe.conf installer/ChangeLog.txt +%doc docs/*txt installer/ChangeLog.txt +%dir %{_sysconfdir}/%{name} +%config(noreplace) %{_sysconfdir}/%{name}/TunSafe.conf %{_bindir}/%{name} -%{_sysconfdir}/%{name} %{_unitdir}/%{name}@.service %changelog -- cgit v1.2.3