slackware-current/source/n/wsdd2/rc.wsdd2
Patrick J Volkerding 7aefbd4988 Fri May 24 19:58:32 UTC 2024
ap/sqlite-3.46.0-x86_64-1.txz:  Upgraded.
l/gvfs-1.54.1-x86_64-1.txz:  Upgraded.
l/python-requests-2.32.2-x86_64-1.txz:  Upgraded.
n/c-ares-1.29.0-x86_64-1.txz:  Upgraded.
n/dhcpcd-10.0.8-x86_64-1.txz:  Upgraded.
n/wsdd2-1.8.7-x86_64-1.txz:  Added.
  Needed by Samba to enable share discovery.
  Thanks to mistfire and Tim Dickson.
2024-05-24 22:29:19 +02:00

40 lines
680 B
Bash

#!/bin/sh
#
# /etc/rc.d/rc.wsdd2
#
# start/stop/restart the wsdd2 daemon.
#
# This init script ships as executable, and will start automatically if Samba
# is configured to start.
wsdd2_start() {
if [ -r /etc/samba/smb.conf -a -x /etc/rc.d/rc.samba -a -x /usr/sbin/wsdd2 ]; then
echo "Starting wsdd2: /usr/bin/wsdd2 -d"
/usr/sbin/wsdd2 -d
fi
}
wsdd2_stop() {
killall --ns $$ -TERM wsdd2 2> /dev/null
}
wsdd2_restart() {
wsdd2_stop
sleep 1
wsdd2_start
}
case "$1" in
'start')
# We don't want to run this more than once, so just use restart to start it:
wsdd2_restart
;;
'stop')
wsdd2_stop
;;
'restart')
wsdd2_restart
;;
*)
wsdd2_start
esac