Skip to content

Commit ce28d62

Browse files
committed
Refine systemd integration checks
1 parent f050442 commit ce28d62

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.github/workflows/rtpproxy_ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,19 @@ jobs:
135135
fi
136136
sudo apt-get install -y "${pkgs[@]}"
137137
138+
- name: Exercise systemd service
139+
run: |
140+
set -euo pipefail
141+
sudo systemctl daemon-reload
142+
sudo systemctl enable --now rtpproxy.socket
143+
sudo systemctl start rtpproxy.service
144+
sudo systemctl status --no-pager rtpproxy.service
145+
sudo systemctl restart rtpproxy.service
146+
sudo systemctl status --no-pager rtpproxy.service
147+
sudo systemctl stop rtpproxy.service
148+
sudo systemctl status --no-pager rtpproxy.service || true
149+
sudo systemctl disable --now rtpproxy.socket
150+
138151
- name: Setup GitHub Actions artifact client
139152
uses: lhotari/gh-actions-artifact-client@v2
140153

debian/changelog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ rtpproxy (3.1+dev1) unstable; urgency=medium
2222
service runs under a locked-down account by default.
2323
* Align the packaged systemd unit with /run paths so PID tracking stays
2424
consistent with RuntimeDirectory management.
25+
* Pass systemd's MAINPID through ExecStart so the daemon receives the
26+
tracked PID even when launched under socket activation.
2527

2628
-- Maxim Sobolev <[email protected]> Wed, 15 May 2024 00:00:00 +0000
2729

rpm/rtpproxy.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EnvironmentFile=-/etc/sysconfig/rtpproxy
1111
PIDFile=/run/rtpproxy/rtpproxy.pid
1212
RuntimeDirectory=rtpproxy
1313
RuntimeDirectoryMode=0755
14-
ExecStart=/usr/bin/rtpproxy -f -s systemd: -p /run/rtpproxy/rtpproxy.pid $OPTIONS
14+
ExecStart=/usr/bin/rtpproxy -f -s systemd:$MAINPID -p /run/rtpproxy/rtpproxy.pid $OPTIONS
1515
ExecReload=/bin/kill -HUP $MAINPID
1616
Restart=on-failure
1717

0 commit comments

Comments
 (0)