0

Could someone help me with automatic start of the script after reboot? It is regarding TeamSpeak3. I want to start ts3server_startscript.sh again if some unwanted reboot of the server occurs.

I tried several ways, but nothing is working, the only way how to start is:

sudo /home/teamspeak/./ts3server_startscript.sh start

I tried editing the crontab with this cron job:

@reboot /home/teamspeak/ts3server_startscript.sh

That is not working.

I tried editing the service file:

nano /lib/systemd/system/ts3server.service

The edit placed this text in it:

[Unit]
Description=Teamspeak Service
Wants=network.target

[Service]
WorkingDirectory=/home/teamspeak
User=teamspeak
ExecStart=/home/teamspeak/ts3server_minimal_runscript.sh
ExecStop=/home/teamspeak/ts3server_startscript.sh stop
ExecReload=/home/teamspeak/ts3server_startscript.sh restart
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target

But nothing works. I have Ubuntu 19.04.

Unfortunately, nothing worked. I read and tried suggested help from local threades, but nothing of it is working :(

StoneCZE
  • 1
  • 1
  • Possible duplicate of https://askubuntu.com/questions/290099/how-to-run-a-script-during-boot-as-root – pymym213 Oct 21 '19 at 12:45
  • Possible duplicate of [How to run a script during boot as root](https://askubuntu.com/questions/290099/how-to-run-a-script-during-boot-as-root) – pymym213 Oct 21 '19 at 12:45
  • nothing of it is working, so thats why I started this thread.CRONTAB si not working as sudo also. service in /lib/systemd as well, not in /etc/... it seems that it is not possible to make this script run after reboot.. – StoneCZE Oct 22 '19 at 10:21

0 Answers0