I am posting this here since I use the KDE version of MX, butg I suspect this issue affects MX23 in general.
Initially this was supposed to be a request for help, but after digging through the issue I can present a solution instead :-)
Anyway, if you do a fresh install of wsdd on MX23, it does not start automatically, at least as long as SysVinit is used. The only post here in the forum that mentions this issue is http://forum.mxlinux.org/viewtopic.php? ... ee#p729831 - which means this issue exists since at least MX23beta2. wsdd itself however works.
The basic cause of this is that the wsdd package presented in the MX23 installer does not add the required init script to init.d. This seemed easy at first, so I dug out the one from https://mxrepo.com/mx/testrepo/pool/tes ... ian.tar.xz, copied the file to /etc/init.d, renamed it to "wsdd", changed user and group to root and made the file executable. Then I used sysv-rc-conf to set the init levels. After a reboot, the init script had failed to start but ran when I started it manually. Since neither wsdd nor the init script I used care about adding anything to a log file, I could not see what happened. Uninstalling everything and installing the whole MX21 .deb package did not help either.
Thus, I rather blindly went on with my 2nd attempt and compared what I had installed with the data on https://github.com/christgau/wsdd/releases/tag/v0.7.1 in the hope to find some error. There is no SysVinit script provided, but the openrc init script looked reasonably similar to me to give it a try and create a new SysVinit script - and it has a nice algorithm to extract the workgroup from the Samba settings which the MX21 init script lacked. Additionally, I removed root as wsddd user (does not seem to be required, actually the author of wsdd encourages to use a user with low access rights) and added some basic logging features. You might clean it up a bit, but it works and logs correctly:
Code: Select all
#!/bin/bash
### BEGIN INIT INFO
# Provides: wsdd
# Required-Start: $syslog $local_fs $remote_fs $network $named $time samba-ad-dc
# Required-Stop: $syslog $local_fs $remote_fs $network $named $time samba-ad-dc
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Web Services Dynamic Discovery host daemon
# Description: Web Services Dynamic Discovery (WSDD) host daemon
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DAEMON_NAME=wsdd
SMB_CONFIG_FILE=/etc/samba/smb.conf
LOG_FILE=/var/log/$DAEMON_NAME.log
WSDD_EXEC=/usr/sbin/$DAEMON_NAME
RUN_AS_USER=daemon
DESC="Web Services Dynamic Discovery host daemon"
PROCESSDIR=/var/run/$DAEMON_NAME
PIDFILE=/var/run/wsdd.pid
# get defaults file; edit that file to configure this script.
if test -e /etc/default/$DAEMON_NAME ; then
. /etc/default/$DAEMON_NAME
fi
# Exit if the daemon is not installed
[ -x $WSDD_EXEC ] || exit 0
# load init-functions
[ -f /lib/init/vars.sh ] && . /lib/init/vars.sh
[ -f /lib/lsb/init-functions ] && . /lib/lsb/init-functions
# start command
do_start() {
log_daemon_msg "Starting $DESC" "$DAEMON_NAME"
OPTS="${WSDD_PARAMS} --chroot=${PROCESSDIR} --shortlog"
if [ -z "$WSDD_WORKGROUP" ]; then
# try to extract workgroup with Samba's testparm
if which testparm >/dev/null 2>/dev/null; then
GROUP="$(testparm -s --parameter-name workgroup 2>/dev/null)"
fi
# fallback to poor man's approach if testparm is unavailable or failed for some reason
if [ -z "$GROUP" ] && [ -r "${SMB_CONFIG_FILE}" ]; then
GROUP=`grep -i '^\s*workgroup\s*=' ${SMB_CONFIG_FILE} | cut -f2 -d= | tr -d '[:blank:]'`
fi
if [ -n "${GROUP}" ]; then
OPTS="-w ${GROUP} ${OPTS}"
fi
else
OPTS="-w ${WSDD_WORKGROUP} ${OPTS}"
fi
if [ ! -r "${LOG_FILE}" ]; then
touch "${LOG_FILE}"
fi
# change owner of log file to user running wsdd - commented out for now since wsdd itself does not log anything
# chown ${RUN_AS_USER} "${LOG_FILE}"
# Ensure PROCESSDIR exists and is accessible
install -o root -g root -m 755 -d $PROCESSDIR
start-stop-daemon --start --background --user ${RUN_AS_USER} --make-pidfile --pidfile $PIDFILE --exec ${WSDD_EXEC} -- ${OPTS}
# direct logging of wsdd output does not work due to the "--background" option which seems needed since the program does not detach itself. A log file other than stdout cannot be defined either :-(
# crude replacement to log at least something...:
RETVAL="$?"
CURRENTDATE=`date +"%F %T,%N"`
if [ $RETVAL -eq 0 ]; then
echo "$CURRENTDATE wsdd started successfully, option flags $OPTS" >> $LOG_FILE 2>&1
exit 0
else
echo "$CURRENTDATE wsdd start error with option flags $OPTS, error code $RETVAL" >> $LOG_FILE 2>&1
log_end_msg 1
exit 1
fi
log_end_msg 0
}
# stop command
do_stop() {
log_daemon_msg "Stopping $DESC" "$DAEMON_NAME"
start-stop-daemon --stop --retry 2 --pidfile $PIDFILE
# same log surrogate as above for stopping
RETVAL="$?"
CURRENTDATE=`date +"%F %T,%N"`
if [ $RETVAL -eq 0 ]; then
echo "$CURRENTDATE wsdd stopped successfully" >> $LOG_FILE 2>&1
else
echo "$CURRENTDATE wsdd stop error code $RETVAL" >> $LOG_FILE 2>&1
fi
# Wait a little and remove stale PID file
sleep 1
if [ -f $PIDFILE ] && ! ps h `cat $PIDFILE` > /dev/null
then
rm -f $PIDFILE
fi
log_end_msg 0
#return "$RETVAL"
}
case "$1" in
start)
do_${1}
;;
stop)
do_${1}
log_end_msg 0
;;
reload)
do_stop
do_start
log_end_msg 0
;;
restart|force-reload)
do_stop
sleep 1
do_start
;;
status)
status_of_proc "$WSDD_EXEC" "$DAEMON_NAME"
exit $?
;;
*)
echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
exit 1
;;
esac
exit 0
Only after doing a sudo update-rc.d wsdd -f remove und sudo update-rc.d wsdd defaults, I finally got wsdd to run. It seems that sysv-rc-conf only adds the links in the rc.* folders but does not care at all about updating the .depend files or anything else that might be needed in case of a new init script, causing the custom script not to be run by init. (I am unsure if that is a bug or intended though...)
Thus in case someone else has that issue on MX23:
- install the MX23 package of wsdd
- create a new script named "wsdd" in /etc/init.d with the above contents
- then use update-rc.d as noted above to register that script.

(edit: replaced script with the correct version)