#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description:
### END INIT INFO
$network $local_fs $remote_fs
$network $local_fs $remote_fs
2 3 4 5
0 1 6
start Samba daemons (nmbd and smbd)
# Defaults
RUN_MODE="daemons"
# Reads config file (will override defaults above)
[ -r /etc/default/samba ] && . /etc/default/samba
SMBD=/usr/sbin/smbd
NMBD=/usr/sbin/nmbd
SAMBA1=/etc/samba/samba1
SAMBA3=/etc/samba/samba3
# clear conflicting settings from the environment
unset TMPDIR
# See if the daemons are there
test -x /usr/sbin/nmbd -a -x /usr/sbin/smbd || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
echo "Starte Samba in $SAMBA1"
$SMBD -D -s ${SAMBA1}/smb.conf-final
$NMBD -D -s ${SAMBA1}/smb.conf-final
echo "Starte Samba in $SAMBA3"
$SMBD -D -s ${SAMBA3}/smb.conf-final
$NMBD -D -s ${SAMBA3}/smb.conf-final
;;
stop)
echo "Stoppe Samba alle Samba-Instanzen"
killall smbd
killall nmbd
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: /etc/init.d/samba {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
