23 lines
584 B
Text
23 lines
584 B
Text
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
if [[ "$1" == "configure" ]]; then
|
||
|
|
||
|
if ! getent group keycloak >/dev/null; then
|
||
|
groupadd --system keycloak
|
||
|
fi
|
||
|
|
||
|
if ! getent passwd keycloak >/dev/null; then
|
||
|
useradd --system --gid keycloak --home-dir /opt/keycloak --shell /bin/false keycloak
|
||
|
fi
|
||
|
|
||
|
chown root:keycloak /opt/keycloak /etc/keycloak
|
||
|
chown keycloak:keycloak -R /opt/keycloak/lib/quarkus /opt/keycloak/data /opt/keycloak/ObjectStore
|
||
|
chmod 0750 /etc/keycloak
|
||
|
|
||
|
deb-systemd-helper enable keycloak.service
|
||
|
deb-systemd-invoke restart keycloak.service
|
||
|
|
||
|
fi
|