Replace init scripts with systemd unit files
authorLucas Werkmeister <mail@lucaswerkmeister.de>
Tue, 30 Aug 2016 12:35:05 +0000 (14:35 +0200)
committerLucas Werkmeister <mail@lucaswerkmeister.de>
Thu, 1 Sep 2016 11:00:52 +0000 (13:00 +0200)
commitdb24c4e8c06c5562283539c0a4b4cce086d70600
tree539e4bbe5769eab28b748561ffbd812949544260
parent234dae50395faa589810f0b1d8d6b7a0fba7393f
Replace init scripts with systemd unit files

The package installs four unit files. gigi-standalone.service works just
like the old cacert-gigi service: gigi will start as root, manage its
own ports, then drop privileges. gigi-proxy.service and .socket let
systemd manage the port and start gigi as its dedicated user. These
services need different configuration for gigi: for the proxy version,
the configuration must contain proxy=true and http.bindPort=stdin, while
for the standalone version the configuration must have proxy=false and
specify real ports. For this reason, we also disable Debian's policy to
automatically start services upon package installation.

(gigi-simple-signer.service is a direct conversion of
cacert-gigi-signer.init.)

Very simple init scripts for gigi-standalone and gigi-simple-signer are
provided, so that running /etc/init.d/gigi-standalone start will still
work. The scripts simply redirect to systemctl; the LSB header is not
included, since the scripts are useless on their own.

Change-Id: I53f0c825880d1b8c082496106a018957d6128392
18 files changed:
debian/cacert-gigi-testing.cacert-gigi-signer.init [deleted file]
debian/cacert-gigi-testing.cacert-gigi.init [deleted file]
debian/cacert-gigi-testing.gigi-simple-signer.init [new file with mode: 0644]
debian/cacert-gigi-testing.gigi-standalone.init [new file with mode: 0644]
debian/cacert-gigi-testing.install [new file with mode: 0644]
debian/cacert-gigi-testing.postinst
debian/cacert-gigi.cacert-gigi-signer.init [deleted file]
debian/cacert-gigi.cacert-gigi.init [deleted file]
debian/cacert-gigi.gigi-simple-signer.init [new file with mode: 0644]
debian/cacert-gigi.gigi-standalone.init [new file with mode: 0644]
debian/cacert-gigi.install [new file with mode: 0644]
debian/cacert-gigi.postinst
debian/control
debian/gigi-proxy.service [new file with mode: 0644]
debian/gigi-proxy.socket [new file with mode: 0644]
debian/gigi-simple-signer.service [new file with mode: 0644]
debian/gigi-standalone.service [new file with mode: 0644]
debian/rules