che iddio ce la mandi bona
@@ -1,3 +1,9 @@
+libreant (0.3-6) testing; urgency=medium
+
+ * libreant system user
+ -- boyska <piuttosto@logorroici.org> Fri, 15 Jan 2016 23:43:57 -0500
libreant (0.3-5) testing; urgency=medium
* configuration fixed
@@ -3,7 +3,7 @@ Description=book sharing solution
Documentation=https://libreant.readthedocs.org/en/v0.3/
[Service]
-User=nobody
+User=libreant
Environment=LIBREANT_SETTINGS=/etc/libreant/libreant.conf
ExecStart=/usr/bin/libreant
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -eu
+USER="libreant"
+GROUP="$USER"
+case "${1}" in
+ configure)
+ adduser \
+ --system \
+ --home /var/lib/libreant \
+ --quiet \
+ --group \
+ ${USER} || true
+ mkdir -p '/var/lib/libreant/fsdb'
+ chown -R ${USER}:${GROUP} '/var/lib/libreant/fsdb'
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ *)
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
+esac
+#DEBHELPER#
+exit 0
@@ -0,0 +1,10 @@
+set -e
+if [ "${1}" = "purge" ]
+then
+ userdel libreant || true
+fi