Blob Blame History Raw
#!/bin/sh

logfile="$1"

config=/etc/sysconfig/icecream
[ -e $config ] && . $config

netname=
if [ -n "$ICECREAM_NETNAME" ] ; then
	netname="-n $ICECREAM_NETNAME"
fi

touch "$logfile"
chown icecream:icecream "$logfile"
chmod 0640 "$logfile"
[ -x /sbin/restorecon ] && /sbin/restorecon "$logfile"

exec /sbin/runuser -s /bin/sh icecream --session-command="/usr/sbin/icecc-scheduler -d -l \"$logfile\" $netname"