laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/29315 )
Change subject: Set working directory in systemd service file
......................................................................
Set working directory in systemd service file
By default systemd will execute service with root directory
(or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it
to 'osmocom' subdir of state directory
(/var/lib for system instance) instead.
Related: OS#4821
Change-Id: I39c48167cbe74b599c8edc3659e787792cbcfdfd
---
M contrib/systemd/osmo-pcap-client.service
M contrib/systemd/osmo-pcap-server.service
2 files changed, 4 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/contrib/systemd/osmo-pcap-client.service b/contrib/systemd/osmo-pcap-client.service
index fd0de75..496358f 100644
--- a/contrib/systemd/osmo-pcap-client.service
+++ b/contrib/systemd/osmo-pcap-client.service
@@ -4,6 +4,8 @@
[Service]
Type=simple
Restart=always
+StateDirectory=osmocom
+WorkingDirectory=%S/osmocom
ExecStart=/usr/bin/osmo-pcap-client -c /etc/osmocom/osmo-pcap-client.cfg
RestartSec=2
diff --git a/contrib/systemd/osmo-pcap-server.service b/contrib/systemd/osmo-pcap-server.service
index 3094fc4..28345d6 100644
--- a/contrib/systemd/osmo-pcap-server.service
+++ b/contrib/systemd/osmo-pcap-server.service
@@ -4,6 +4,8 @@
[Service]
Type=simple
Restart=always
+StateDirectory=osmocom
+WorkingDirectory=%S/osmocom
ExecStart=/usr/bin/osmo-pcap-server -c /etc/osmocom/osmo-pcap-server.cfg
RestartSec=2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/29315
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I39c48167cbe74b599c8edc3659e787792cbcfdfd
Gerrit-Change-Number: 29315
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: msuraev.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/29315 )
Change subject: Set working directory in systemd service file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/29315
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I39c48167cbe74b599c8edc3659e787792cbcfdfd
Gerrit-Change-Number: 29315
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 12 Sep 2022 07:12:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/29316 )
Change subject: Set working directory in systemd service file
......................................................................
Set working directory in systemd service file
By default systemd will execute service with root directory
(or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it
to 'osmocom' subdir of state directory
(/var/lib for system instance) instead.
Related: OS#4821
Change-Id: Idad82186d6ef7f00487cf162306b0733886fc129
---
M contrib/systemd/osmo-sip-connector.service
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/contrib/systemd/osmo-sip-connector.service b/contrib/systemd/osmo-sip-connector.service
index 673aa53..27688af 100644
--- a/contrib/systemd/osmo-sip-connector.service
+++ b/contrib/systemd/osmo-sip-connector.service
@@ -6,6 +6,8 @@
[Service]
Type=simple
Restart=always
+StateDirectory=osmocom
+WorkingDirectory=%S/osmocom
ExecStart=/usr/bin/osmo-sip-connector -c /etc/osmocom/osmo-sip-connector.cfg
RestartSec=2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/29316
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Idad82186d6ef7f00487cf162306b0733886fc129
Gerrit-Change-Number: 29316
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: msuraev.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/29316 )
Change subject: Set working directory in systemd service file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/29316
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Idad82186d6ef7f00487cf162306b0733886fc129
Gerrit-Change-Number: 29316
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 12 Sep 2022 07:12:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-smlc/+/29317 )
Change subject: Set working directory in systemd service file
......................................................................
Set working directory in systemd service file
By default systemd will execute service with root directory
(or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it
to 'osmocom' subdir of state directory
(/var/lib for system instance) instead.
Related: OS#4821
Change-Id: Ie8b014e8eac23221a6a7087bb2b886014323680b
---
M contrib/systemd/osmo-smlc.service
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/contrib/systemd/osmo-smlc.service b/contrib/systemd/osmo-smlc.service
index e159370..ce5a9d3 100644
--- a/contrib/systemd/osmo-smlc.service
+++ b/contrib/systemd/osmo-smlc.service
@@ -4,6 +4,8 @@
[Service]
Type=simple
Restart=always
+StateDirectory=osmocom
+WorkingDirectory=%S/osmocom
ExecStart=/usr/bin/osmo-smlc -c /etc/osmocom/osmo-smlc.cfg
RestartSec=2
--
To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/29317
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-smlc
Gerrit-Branch: master
Gerrit-Change-Id: Ie8b014e8eac23221a6a7087bb2b886014323680b
Gerrit-Change-Number: 29317
Gerrit-PatchSet: 2
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: msuraev.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-smlc/+/29317 )
Change subject: Set working directory in systemd service file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-smlc/+/29317
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-smlc
Gerrit-Branch: master
Gerrit-Change-Id: Ie8b014e8eac23221a6a7087bb2b886014323680b
Gerrit-Change-Number: 29317
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 12 Sep 2022 07:12:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin, msuraev.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29303 )
Change subject: Don't manually create pid file
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
> That's the only osmocom service which creates pidfile manually. […]
I also think it's weird that one of our programs contains code to generate a pid file but no others do. Either we want to do that, and then it should be part of libosmocore to do it for all programs, or we don't do it.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29303
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I86bcaedbc8cb1297476ad741eaa45585fea3c380
Gerrit-Change-Number: 29303
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 12 Sep 2022 07:12:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: comment