I can't figure out what samba has to do with startup
#!/bin/sh
DAEMON="/usr/sbin/zerotier-one"
prog=`basename $DAEMON`
MODULE="tun"
PIDFILE="/var/lib/zerotier-one/zerotier-one.pid"
test -e $DAEMON || exit 0
case "$1" in
start)
if [ -d /var/lib/samba/msg.lock ]; then
rm -rf /var/lib/samba/msg.lock
fi
echo -n "Starting $prog"
# Make sure kernel module is loaded
if ! grep -q $MODULE /proc/filesystems
then
# Try load the kernel module fail if we can't
modprobe $MODULE >/dev/null 2>&1
if [ $? -eq 1 ]
then
echo "Error: failed to load $MODULE module."
return 1
fi
fi
start-stop-daemon --start --quiet --background --exec $DAEMON
echo "."
;;
Edited by oldgraf, 24 September 2019 - 09:16.