summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--debian/ick2.postinst29
-rw-r--r--setup.py2
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#
diff --git a/setup.py b/setup.py
index d8721ed..7b0b30e 100644
--- a/setup.py
+++ b/setup.py
@@ -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=[],
)