Change in python/osmo-python-tests[master]: ctrl2cgi: Add systemd service file and install with debian

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Aug 29 15:17:37 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/10693


Change subject: ctrl2cgi: Add systemd service file and install with debian
......................................................................

ctrl2cgi: Add systemd service file and install with debian

Change-Id: I062ae5b9ed09f52b27c7d85b31daba0d14751846
---
A contrib/systemd/ctrl2cgi.service
A debian/python3-osmopy-utils.ctrl2cgi.service
M debian/rules
3 files changed, 17 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/93/10693/1

diff --git a/contrib/systemd/ctrl2cgi.service b/contrib/systemd/ctrl2cgi.service
new file mode 100644
index 0000000..36ff78b
--- /dev/null
+++ b/contrib/systemd/ctrl2cgi.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Proxy between given GCI service and Osmocom CTRL protocol
+
+[Service]
+Type=simple
+Restart=always
+ExecStart=python3 /usr/bin/ctrl2cgi.py -o -d -c /etc/osmocom/ctrl2cgi.ini
+RestartSec=2
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/python3-osmopy-utils.ctrl2cgi.service b/debian/python3-osmopy-utils.ctrl2cgi.service
new file mode 120000
index 0000000..e8cde65
--- /dev/null
+++ b/debian/python3-osmopy-utils.ctrl2cgi.service
@@ -0,0 +1 @@
+../contrib/systemd/ctrl2cgi.service
\ No newline at end of file
diff --git a/debian/rules b/debian/rules
index d9e98af..6bdd719 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,3 +12,8 @@
 	rm -rf $(CURDIR)/debian/python3-osmopy-libs/usr/bin
 	python3 setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-osmopy-utils
 	rm -rf $(CURDIR)/debian/python3-osmopy-utils/usr/lib
+
+override_dh_installinit:
+	# Install service file with different name than package name:
+	# https://unix.stackexchange.com/questions/306234/is-it-possible-to-install-two-services-for-one-package-using-dh-installinit-how
+	dh_installinit --name=ctrl2cgi

-- 
To view, visit https://gerrit.osmocom.org/10693
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I062ae5b9ed09f52b27c7d85b31daba0d14751846
Gerrit-Change-Number: 10693
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180829/2f9b37aa/attachment.htm>


More information about the gerrit-log mailing list