Hi,
Today I updated my Linux TS3 server from version 3.0.11.x to 3.0.13.6 but it now fails to start up as a service.
The way my server is set up:
The server is stored in /opt/teamspeak3-server/
The files are all owned by a user called teamspeak3-user (chown -R teamspeak3-user:teamspeak3-user *)
The file /etc/init.d/ts3 contains the following:
Code:
#!/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 TeamSpeak3 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-user
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
sudo -u $USER $DAEMON $1 $OPTIONS
There were no problems with the service running before I did the update.
The steps I took to update were:
Stop the service.
Backup the /opt/teamspeak3-server/ directory.
Extract the new version in to the /opt/teamspeak3-server/ directory.
Ran chown to change ownership of overwritten files to teamspeak3-user.
Rebooted the system.
No TeamSpeak3 server to connect to!
So I checked the status of the service with "service ts3 status" and got the following:
Code:
● ts3.service - LSB: TeamSpeak3 Server Daemon
Loaded: loaded (/etc/init.d/ts3; bad; vendor preset: enabled)
Active: active (exited) since Fri 2017-02-03 14:27:01 GMT; 13s ago
Docs: man:systemd-sysv-generator(8)
Process: 2807 ExecStop=/etc/init.d/ts3 stop (code=exited, status=0/SUCCESS)
Process: 3279 ExecStart=/etc/init.d/ts3 start (code=exited, status=0/SUCCESS)
Feb 03 14:26:59 galbi3000-linux systemd[1]: Starting LSB: TeamSpeak3 Server Daemon...
Feb 03 14:27:01 galbi3000-linux sudo[3283]: root : TTY=unknown ; PWD=/ ; USER=teamspeak3-user ; COMMAND=/opt/teamspeak3-server/ts3server_startscript.sh start inifile=ts3server.ini
Feb 03 14:27:01 galbi3000-linux sudo[3283]: pam_unix(sudo:session): session opened for user teamspeak3-user by (uid=0)
Feb 03 14:27:01 galbi3000-linux ts3[3279]: sudo: unable to execute /opt/teamspeak3-server/ts3server_startscript.sh: Permission denied
Feb 03 14:27:01 galbi3000-linux sudo[3283]: pam_unix(sudo:session): session closed for user teamspeak3-user
Feb 03 14:27:01 galbi3000-linux systemd[1]: Started LSB: TeamSpeak3 Server Daemon.
So I tried running the server directly using ts3server_minimal_runscript.sh and it reported the database was in use and kept timing out waiting for it to free up so I stopped that and then stopped the ts3 service and tried running the server again with ts3server_minimal_runscript.sh. The server ran fine using the script!
So, why is it not working as a service any more? How can I fix it?