#!/sbin/openrc-run
# Generated by ../utrans from:
#  de718691081fbceb07b5338f5dabec659b76bc404769356bc8c3ae27b375984e  ./input/sssd.service

description="System Security Services Daemon."

supervisor="supervise-daemon"
command="/usr/sbin/sssd"
command_args="-i ${DEBUG_LOGGER}"
command_user="root:root"
start_stop_daemon_args="--secbits 3 --capabilities !CAP_BLOCK_SUSPEND,!CAP_SYS_BOOT,!CAP_NET_BROADCAST,!CAP_SETPCAP,!CAP_SYS_RESOURCE,!CAP_SYS_RAWIO,!CAP_DAC_OVERRIDE,!CAP_KILL,!CAP_FSETID,!CAP_SYS_PTRACE,!CAP_SYS_MODULE,!CAP_SETFCAP,!CAP_LEASE,!CAP_CHOWN,!CAP_NET_ADMIN,!CAP_AUDIT_WRITE,!CAP_WAKE_ALARM,!CAP_MKNOD,!CAP_AUDIT_CONTROL,!CAP_SYS_CHROOT,!CAP_PERFMON,!CAP_MAC_ADMIN,!CAP_IPC_OWNER,!CAP_SYSLOG,!CAP_SYS_PACCT,!CAP_CHECKPOINT_RESTORE,!CAP_FOWNER,!CAP_SYS_ADMIN,!CAP_NET_RAW,!CAP_SYS_NICE,!CAP_AUDIT_READ,!CAP_NET_BIND_SERVICE,!CAP_IPC_LOCK,!CAP_LINUX_IMMUTABLE,!CAP_MAC_OVERRIDE,!CAP_BPF,!CAP_SYS_TIME,!CAP_SYS_TTY_CONFIG,,CAP_SETGID,CAP_SETUID,CAP_DAC_READ_SEARCH,"
depend() {
    use mountnfs mountnfs-bootclean umountnfs sendsigs mountall mountall-bootclean mountoverflowtmp umountfs
    before systemd-user-sessions
    after mountnfs mountnfs-bootclean umountnfs sendsigs mountall mountall-bootclean mountoverflowtmp umountfs
}
start_pre() {
  ( # Triggering conditions
   ( [ -d '/etc/sssd/conf.d/' ] && files=$(ls -qA -- '/etc/sssd/conf.d/') && [ -n "$files" ] ) ||
   ( [ -e '/etc/sssd/sssd.conf' ] ) 
  ) || start() { einfo "Skipped due to no Triggering Conditions" ; }
  /bin/chown -f -R root:root /etc/sssd || true
  /bin/chmod -f -R g+r /etc/sssd || true
  /bin/sh -c "/bin/chown -f root:root /var/lib/sss/db/*.ldb" || true
  /bin/chown -f -R root:root /var/lib/sss/gpo_cache || true
  /bin/sh -c "/bin/chown -f root:root /var/log/sssd/*.log" || true
}
