From 70257dfa7d6ddb5e1952ca856fc5cf577d069d8d Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Mon, 14 Sep 2020 15:58:35 +0200 Subject: [PATCH] Install Systemd service unit with debian package --- README.md | 13 +------------ debian/control | 2 +- {doc => debian}/ghostream.service | 1 + debian/rules | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) rename {doc => debian}/ghostream.service (94%) diff --git a/README.md b/README.md index bcc878d..6839c34 100644 --- a/README.md +++ b/README.md @@ -77,15 +77,4 @@ Now enable and start OvenMediaEngine, `sudo systemctl enable --now ovenmediaengi On Debian you can install [ghostream deb](https://gitlab.crans.org/nounous/ghostream/-/jobs/artifacts/master/raw/build/ghostream_0.1.0_all.deb?job=build-deb). -On other system, you might install manually the Python module. - -#### Service unit - -Copy [ghostreamer.service](doc/ghostream.service) to `/etc/systemd/system/ghostream.service` -and customize. - -``` -sudo apt install uwsgi-plugin-python3 -sudo systemctl daemon-reload -sudo systemctl enable --now ghostream -``` +On other system, you might install manually the Python module and Systemd unit [ghostreamer.service](debian/ghostream.service). diff --git a/debian/control b/debian/control index 3531242..173cfdb 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ X-Python3-Version: >= 3.6 Package: ghostream Architecture: all Multi-Arch: foreign -Depends: ${misc:Depends}, ${python3:Depends} +Depends: ${misc:Depends}, ${python3:Depends}, uwsgi-plugin-python3 Description: simple streaming server web interface Gostream is a web interface that uses OvenMediaEngine and NGINX streaming capabilities to build a simple and efficient streaming server. diff --git a/doc/ghostream.service b/debian/ghostream.service similarity index 94% rename from doc/ghostream.service rename to debian/ghostream.service index 348b61b..4ee8f4e 100644 --- a/doc/ghostream.service +++ b/debian/ghostream.service @@ -11,6 +11,7 @@ Environment=LDAP_USER_DN="cn=Utilisateurs,dc=crans,dc=org" Environment=SITE_NAME="Crans Stream" Environment=SITE_HOSTNAME="stream.crans.org" Environment=FAVICON="https://www.crans.org/images/favicon.ico" +EnvironmentFile=-/etc/default/ghostream ExecStart=/usr/bin/uwsgi --http-socket 127.0.0.1:8080 --master --plugin python3 --module ghostream:app --static-map /static=/var/local/ghostream/ghostream/static Restart=on-failure KillSignal=SIGQUIT diff --git a/debian/rules b/debian/rules index e29871f..c061876 100755 --- a/debian/rules +++ b/debian/rules @@ -2,4 +2,4 @@ export DH_VERBOSE = 1 %: - dh $@ --with python3 --buildsystem=pybuild + dh $@ --with python3,systemd --buildsystem=pybuild