aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/systemd
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2024-05-15 10:59:32 +0200
committerOliver Smith <osmith@sysmocom.de>2024-05-15 10:59:32 +0200
commitb7aa08f69bd9ea4fed4139405016325390b08a95 (patch)
tree01320ec9bdfe87c309a2283131ef85b1ab25cdb6 /contrib/systemd
parent36e4fb63b8dd181095b446b1ce153f8e10aea583 (diff)
contrib/systemd: run as osmocom user
I have verified that with AmbientCapabilities=CAP_SYS_NICE, setting scheduling policy as described in the manual still works as expected. Related: OS#4107 Change-Id: I37be0dd4df012047a495235195912bd06ad2423d
Diffstat (limited to 'contrib/systemd')
-rw-r--r--contrib/systemd/osmo-bts-trx.service3
-rw-r--r--contrib/systemd/osmo-bts-virtual.service3
2 files changed, 6 insertions, 0 deletions
diff --git a/contrib/systemd/osmo-bts-trx.service b/contrib/systemd/osmo-bts-trx.service
index 9763dff8..99e981c4 100644
--- a/contrib/systemd/osmo-bts-trx.service
+++ b/contrib/systemd/osmo-bts-trx.service
@@ -10,6 +10,9 @@ StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2
+User=osmocom
+Group=osmocom
+AmbientCapabilities=CAP_SYS_NICE
# CPU scheduling policy:
CPUSchedulingPolicy=rr
diff --git a/contrib/systemd/osmo-bts-virtual.service b/contrib/systemd/osmo-bts-virtual.service
index dee3ab7f..2bca83be 100644
--- a/contrib/systemd/osmo-bts-virtual.service
+++ b/contrib/systemd/osmo-bts-virtual.service
@@ -10,6 +10,9 @@ StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2
+User=osmocom
+Group=osmocom
+AmbientCapabilities=CAP_SYS_NICE
# CPU scheduling policy:
CPUSchedulingPolicy=rr