centreon-common.postinst 423 Bytes
Newer Older
1
2
3
4
5
6
7
#!/bin/sh

if [ "$1" = "configure" ] ; then
  if [ ! "$(getent passwd centreon)" ]; then
    # User will have a shell. Not secure but require refactoring otherwise.
    adduser --system --group --shell /bin/bash --home /var/lib/centreon centreon
  fi
Luiz Costa's avatar
Luiz Costa committed
8

9
10
11
12
13
14
15
  chown -vR centreon:centreon \
    /etc/centreon \
    /var/cache/centreon
fi

# Initial installation
systemctl --no-reload preset centreon.service || : &>/dev/null || :