debian: run as a daemon, ask informed consent (#162)

* Set verbose mode, depend on adduser

* Run as daemon

* Generate manpage

* Implement informed consent

* Set version

* Switch format to native

* Set environment

* Update packaging

* Create test and release pipelines

* Update debian/ooniprobe-cli.service

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* Update debian/ooniprobe-cli.service

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* Update debian/ooniprobe.conf.disabled

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* fix(linux-debian-packages): build also on pull requests

Otherwise there's no way for us to test :^).

* fix(debian/control): ubuntu 20.04 has debhelper 12

See https://packages.ubuntu.com/focal/debhelper

* fix(debian/control): debhelper-compat relations doesn't work the way I thought

* Update debian/ooniprobe-cli.timer

Co-authored-by: Simone Basso <bassosimone@gmail.com>
This commit is contained in:
Federico Ceratto
2020-12-15 12:05:13 +00:00
committed by GitHub
parent 862e27efcd
commit 8df91ecb1b
15 changed files with 192 additions and 13 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_version 2.0
if [ "$1" = "configure" ]; then
if ! getent passwd ooniprobe >/dev/null; then
adduser --quiet --system --group --home /var/lib/ooniprobe ooniprobe
fi
fi
# Extract the answer
db_get ooniprobe-cli/ask-consent || true
consent="$RET"
CF=/etc/ooniprobe/ooniprobe.conf
[ "$consent" = true ] && [ -f ${CF}.disabled ] && mv ${CF}.disabled ${CF}
[ "$consent" = false ] && [ -f ${CF} ] && mv ${CF} ${CF}.disabled
#DEBHELPER#
exit 0