diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-12 14:19:35 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-12 19:49:40 +0100 |
commit | 5efb939d05a432c0d2b4c1d62710747f998048cf (patch) | |
tree | ad85f7012f19283b534761cae426af3454ee5752 | |
parent | 509ed4047a4013070dde5785bb33db092c8fbe04 (diff) | |
download | ick2-5efb939d05a432c0d2b4c1d62710747f998048cf.tar.gz |
Add: install worker-manager, create user/group for it in .deb
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/ick2.postinst | 29 | ||||
-rw-r--r-- | setup.py | 2 |
3 files changed, 22 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index 1743342..107a19f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ick2 (0.13+git-1) UNRELEASED; urgency=medium * New upstream version. + * postinst: create user, group for worker-manager -- Lars Wirzenius <liw@liw.fi> Mon, 16 Oct 2017 22:16:53 +0300 diff --git a/debian/ick2.postinst b/debian/ick2.postinst index c951569..028139b 100644 --- a/debian/ick2.postinst +++ b/debian/ick2.postinst @@ -16,20 +16,31 @@ set -eu -# Create a group and user for ick -addgroup --system --force _ick -adduser --system --disabled-login --disabled-password \ - --gecos "Ick CI" --home /var/lib/ick \ + +create_user() +{ + local name="$1" + local home="$2" + local logdir="$3" + + addgroup --force "$name" || true + adduser --disabled-login --disabled-password \ + --gecos "Ick CI" --home "$home" \ --shell /bin/true --force \ - _ick + --ingroup "$name" \ + "$name" || true + install -d -m 0755 -o "$name" -g "$name" "$logdir" +} + -# Create the log directory with the right ownership and permissions. -install -d -m 0755 -o _ick -g _ick /var/log/ick +# Create a group and user for ick controllerand worker-manager +create_user _ick /var/lib/ick /var/log/ick +create_user _ickwm /var/lib/ick/wm /var/log/ickwm -# Create ick state dir +# Create controller state dir install -d -m 0755 -o _ick -g _ick /var/lib/ick/state -# Create config dir. +# Create controller config dir. install -d -m 0755 -o root -g root /etc/ick #DEBHELPER# @@ -27,6 +27,6 @@ setup( url='http://liw.fi/ick/', py_modules=['ick_controller'], packages=['ick2'], - scripts=['create-token', 'start_ick', 'icktool'], + scripts=['create-token', 'start_ick', 'icktool', 'worker_manager'], data_files=[], ) |