diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-02-09 13:53:33 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-02-09 13:56:43 +0200 |
commit | f1f291b270b96fe1511286cb807f02c9741b0d71 (patch) | |
tree | 509a7f697685e9282fbdc6838fb037ff6cb5e4dd /debian/qvisqve.postinst | |
parent | 3b208da0461f5a129fcbc527fbfdd9ed8309d077 (diff) | |
download | qvisqve-f1f291b270b96fe1511286cb807f02c9741b0d71.tar.gz |
Rename: to Qvisqve
Diffstat (limited to 'debian/qvisqve.postinst')
-rw-r--r-- | debian/qvisqve.postinst | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/qvisqve.postinst b/debian/qvisqve.postinst new file mode 100644 index 0000000..2711755 --- /dev/null +++ b/debian/qvisqve.postinst @@ -0,0 +1,38 @@ +#!/bin/sh +# Copyright 2018 Lars Wirzenius +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -eu + + +create_user() +{ + local name="$1" + local logdir="$2" + + addgroup --force "$name" || true + adduser --disabled-login --disabled-password \ + --gecos "Ick CI" \ + --shell /bin/true --force \ + --ingroup "$name" \ + "$name" || true + install -d -m 0755 -o "$name" -g "$name" "$logdir" +} + + +# Create a group and user for Qvisqve +create_user _qvisqve /var/log/qvisqve + +#DEBHELPER# |