diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/osmo-pcap.spec.in | 9 | ||||
-rw-r--r-- | contrib/systemd/osmo-pcap-client.service | 3 | ||||
-rw-r--r-- | contrib/systemd/osmo-pcap-server.service | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/contrib/osmo-pcap.spec.in b/contrib/osmo-pcap.spec.in index 0aa079a..c7c0d19 100644 --- a/contrib/osmo-pcap.spec.in +++ b/contrib/osmo-pcap.spec.in @@ -62,6 +62,9 @@ make %{?_smp_mflags} %service_del_postun osmo-pcap-client.service osmo-pcap-server.service %pre +getent group osmocom >/dev/null || groupadd --system osmocom +getent passwd osmocom >/dev/null || useradd --system --gid osmocom --home-dir /var/lib/osmocom \ + --shell /sbin/nologin --comment "Open Source Mobile Communications" osmocom %service_add_pre osmo-pcap-client.service osmo-pcap-server.service %post @@ -75,13 +78,13 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) %license COPYING %doc AUTHORS %doc %{_docdir}/%{name}/examples -%dir %{_sysconfdir}/osmocom +%dir %attr(2775, root, osmocom) %{_sysconfdir}/osmocom %config(noreplace) %{_sysconfdir}/osmocom/osmo-pcap-client.cfg %config(noreplace) %{_sysconfdir}/osmocom/osmo-pcap-server.cfg %{_bindir}/osmo-pcap-client %{_bindir}/osmo-pcap-server -%{_unitdir}/osmo-pcap-client.service -%{_unitdir}/osmo-pcap-server.service +%attr(0660, osmocom, osmocom) %{_unitdir}/osmo-pcap-client.service +%attr(0660, osmocom, osmocom) %{_unitdir}/osmo-pcap-server.service %dir %{_datadir}/%{name} %{_datadir}/%{name}/osmo_pcap_clean_old diff --git a/contrib/systemd/osmo-pcap-client.service b/contrib/systemd/osmo-pcap-client.service index c79fafc..85e6592 100644 --- a/contrib/systemd/osmo-pcap-client.service +++ b/contrib/systemd/osmo-pcap-client.service @@ -8,8 +8,11 @@ Type=simple Restart=always StateDirectory=osmocom WorkingDirectory=%S/osmocom +User=osmocom +Group=osmocom ExecStart=/usr/bin/osmo-pcap-client -c /etc/osmocom/osmo-pcap-client.cfg RestartSec=2 +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW [Install] WantedBy=multi-user.target diff --git a/contrib/systemd/osmo-pcap-server.service b/contrib/systemd/osmo-pcap-server.service index a6b6822..a35cb3e 100644 --- a/contrib/systemd/osmo-pcap-server.service +++ b/contrib/systemd/osmo-pcap-server.service @@ -8,6 +8,8 @@ Type=simple Restart=always StateDirectory=osmocom WorkingDirectory=%S/osmocom +User=osmocom +Group=osmocom ExecStart=/usr/bin/osmo-pcap-server -c /etc/osmocom/osmo-pcap-server.cfg RestartSec=2 |