É simples executá-lo antes do comando que executa o TS3 DAEMON
na última linha do seu script, em seguida, defina o comando sleep
por 5 segundos, por exemplo, e o script será assim:
#! /bin/sh
### BEGIN INIT INFO
# Provides: ts3
# Required-Start: $network mysql
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TeamSpeak3 Server Daemon
# Description: Starts/Stops/Restarts the TeamSpeak Server Daemon
### END INIT INFO
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="TeamSpeak3 Server"
NAME=teamspeak3-server
USER=teamspeak3
DIR=/opt/teamspeak3-server
OPTIONS=inifile=ts3server.ini
DAEMON=$DIR/ts3server_startscript.sh
#PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
sleep 2
#####################################################
$DIR/MyScript
sleep 5
#####################################################
sudo -u $USER $DAEMON $1 $OPTIONS
o $DER
var se refere ao diretório de serviço do TS3 /opt/teamspeak3-server