From aeae20524bf0bf53a3db1b83247e269d14b0fde9 Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Mon, 5 Jul 2021 16:36:48 +0200 Subject: [PATCH] Add systemd service file to debian package --- .gitlab-ci.yml | 2 +- debian/control | 2 +- debian/documento-printserver.service | 9 +++++++++ debian/rules | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 debian/documento-printserver.service diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e97338..c10b27d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,7 @@ build-deb: stage: build before_script: - *before-script - - apt update && apt install -y build-essential debhelper devscripts equivs dh-virtualenv libffi-dev + - apt update && apt install -y build-essential debhelper devscripts equivs dh-virtualenv libffi-dev dh-systemd script: - ./build-deb.sh - mkdir build diff --git a/debian/control b/debian/control index b0bedde..20ff549 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: documento-printserver Section: python Priority: extra Maintainer: Jonathan Weth <dev@jonathanweth.de> -Build-Depends: debhelper (>= 10), python3, dh-virtualenv (>= 1.0), +Build-Depends: debhelper (>= 10), dh-systemd (>=1.5), python3, dh-virtualenv (>= 1.0), python3-setuptools, python3-pip, python3-dev, libffi-dev Standards-Version: 4.5.0 Homepage: https://edugit.org/documento/documento-printserver diff --git a/debian/documento-printserver.service b/debian/documento-printserver.service new file mode 100644 index 0000000..198c965 --- /dev/null +++ b/debian/documento-printserver.service @@ -0,0 +1,9 @@ +[Unit] +Description=Documento Printserver +After=network.target + +[Service] +ExecStart=/usr/bin/documento-printserver + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/debian/rules b/debian/rules index 83ba5db..a5433a1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh $@ --with python-virtualenv + dh $@ --with python-virtualenv,systemd override_dh_virtualenv: dh_virtualenv --python python3 --extra-pip-arg "--no-deps" --use-system-packages -- GitLab