From ac38357f20521c6101defe0b551bce0f04d40e89 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Thu, 24 Sep 2015 15:23:14 -0300 Subject: [PATCH] User and group Colab created on %pre --- colab/colab.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/colab/colab.spec b/colab/colab.spec index fd817d3..d53d5da 100644 --- a/colab/colab.spec +++ b/colab/colab.spec @@ -111,11 +111,14 @@ rm -rf %{buildvenv} /lib/systemd/system/celeryd.service /lib/systemd/system/celerybeat.service + +%pre + +getent group colab > /dev/null || groupadd --system colab +getent passwd colab > /dev/null || useradd --system --user-group colab --home-dir /usr/lib/colab --no-create-home colab + + %post -groupadd colab || true -if ! id colab; then - useradd --system --gid colab --home-dir /usr/lib/colab --no-create-home colab -fi mv /etc/colab/gunicorn.py.example /etc/colab/gunicorn.py -- libgit2 0.21.2