At boot, our server needs to start Teamspeak and a teamspeak bot. The first part works, teamspeak always starts, never an issue. However, the teamspeak bot never starts, nor is the Screen session created.
rc.local file displayed below.
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sleep 2
su teamspeak -c 'screen -d -m -S ts3 /home/teamspeak/teamspeak/ts3server_minimal_runscript.sh inifile=ts3server.ini'
sleep 2
su teamspeak -c 'screen -d -m -S tsbot /usr/bin/java -jar /home/teamspeak/jts3servermod/JTS3ServerMod.jar'
exit 0
As stated, teamspeak starts the way it should, within it's own screen session. The .jar file does not however and the screen session isn't there either.
Can someone tell me where I made a mistake?