aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/microservices/collectd-operator/build/bin/entrypoint
blob: 3c0546c5474f006a7ec7fe1c83e3eebdd501ff41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh -e

# This is documented here:
# https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines

if ! whoami &>/dev/null; then
  if [ -w /etc/passwd ]; then
    echo "${USER_NAME:-collectd-operator}:x:$(id -u):$(id -g):${USER_NAME:-collectd-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd
  fi
fi

exec ${OPERATOR} $@