#!/usr/bin/env /lib/runit/invoke-run
set -e

NAME="winbindd"
DAEMON=/usr/sbin/$NAME
PIDFILE=/run/samba/$NAME.pid

[ -f /etc/default/samba ] && . /etc/default/samba

# Exit service if DAEMON is not installed or configured
test -x $DAEMON || exit 0
/usr/share/samba/is-configured $NAME || exit 0

exec 2>&1

echo "Starting $NAME..."
exec $DAEMON -F --debug-stdout --no-process-group
