summaryrefslogtreecommitdiff
path: root/tunsafe.spec
diff options
context:
space:
mode:
Diffstat (limited to 'tunsafe.spec')
-rw-r--r--tunsafe.spec11
1 files changed, 7 insertions, 4 deletions
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