diff options
| author | CoprDistGit <infra@openeuler.org> | 2025-12-29 07:27:15 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2025-12-29 07:27:15 +0000 |
| commit | 9691c35f9e8efa978dce17954212ebee8dc55ce3 (patch) | |
| tree | 5f283e290ecf39652d1a652e744c28c1acf3d789 | |
| parent | 600369b89bd73e829259c8b42f247d47d8946b88 (diff) | |
automatic import of tunsafeopeneuler24.03_LTSopeneuler22.03_LTS_SP4
| -rw-r--r-- | tunsafe.spec | 11 |
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 |
