#!/bin/bash

# Make sure this file exists with at least a blank line.
if [ ! -f /etc/sssd/sssd.conf ]; then
  echo  > /etc/sssd/sssd.conf
fi

# These files must be 0600 and root:root.
chmod 0600      /etc/sssd/sssd.conf /etc/sssd/conf.d/twitch_ldap.conf
chown root:root /etc/sssd/sssd.conf /etc/sssd/conf.d/twitch_ldap.conf

# Kick our LDAP service.
/bin/systemctl restart sssd
