aports/testing/81voltd/services.patch
Achill Gilgenast cd549639fd testing/81voltd: new aport
https://gitlab.postmarketos.org/modem/81voltd
Server-side implementation of IMS Data service on QMI/QRTR
2026-01-11 19:15:51 +01:00

83 lines
2.0 KiB
Diff

Patch-Source: https://gitlab.postmarketos.org/modem/81voltd/-/merge_requests/5
---
From 8c47638137d7c852f7bb0b208d541830f214ed47 Mon Sep 17 00:00:00 2001
From: Achill Gilgenast <achill@achill.org>
Date: Fri, 2 Jan 2026 19:08:17 +0100
Subject: [PATCH] build: add systemd and openrc services
Copied by the service files we have downstream in postmarketOS
---
81voltd.initd.in | 13 +++++++++++++
81voltd.service.in | 9 +++++++++
meson.build | 20 ++++++++++++++++++++
3 files changed, 42 insertions(+)
create mode 100644 81voltd.initd.in
create mode 100644 81voltd.service.in
diff --git a/81voltd.initd.in b/81voltd.initd.in
new file mode 100644
index 0000000..8348226
--- /dev/null
+++ b/81voltd.initd.in
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+name="81voltd"
+description="IMS Data service on QMI/QRTR"
+
+command="@bindir@/81voltd"
+command_args=""
+command_background=true
+
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need modemmanager
+}
diff --git a/81voltd.service.in b/81voltd.service.in
new file mode 100644
index 0000000..6084ae7
--- /dev/null
+++ b/81voltd.service.in
@@ -0,0 +1,9 @@
+[Unit]
+Description=IMS Data service on QMI/QRTR
+After=ModemManager.target
+
+[Service]
+ExecStart=@bindir@/81voltd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meson.build b/meson.build
index f5c7839..258c13e 100644
--- a/meson.build
+++ b/meson.build
@@ -28,4 +28,24 @@ executable('81voltd',
qmi,
dependencies : [libmm, libqmi, libqrtr],
install : true)
+
install_man('81voltd.1')
+
+configure_file(
+ input: '81voltd.service.in',
+ output: '81voltd.service',
+ configuration: { 'bindir': get_option('prefix') / get_option('bindir') },
+ install: true,
+ install_dir: get_option('prefix') / 'lib' / 'systemd' / 'system'
+)
+
+openrcinit = configure_file(
+ input: '81voltd.initd.in',
+ output: '81voltd.initd',
+ configuration: { 'bindir': get_option('prefix') / get_option('bindir') },
+)
+install_data(openrcinit,
+ install_dir: get_option('sysconfdir') / 'init.d',
+ install_mode : 'rwxr-xr-x',
+ rename: '81voltd'
+)
--
GitLab