So I made a bash script to automatically get ts3 installed and running on my vps, but for some reason it doesn't work.

The error I get is:

> /root/install/ts3install.sh: 4: cd: can't cd to /root/teamspeak3-server_linux-x86/

> /root/install/ts3install.sh: 6: /root/install/ts3install.sh:
> ./ts3server_startscript.sh: not found

This is my script:

wget http://dl.4players.de/ts/releases/
tar -xzvf teamspeak3-server_linux-x86-
cd /root/teamspeak3-server_linux-x86/
cd `pwd`
./ts3server_startscript.sh start

Can anybody help?

  • Are you supposed to execute the installer from /? Do the contents of the tar file have a hardcoded full path? – glenn jackman Jun 5 '15 at 20:43
  • Uhm I am not familar with linux really I just thaught myself a bit by reading tutorials etc. But when I execute the commands in my bash in Putty everything works fine. Just the bash does not work for some reason :/ Can you maybe tell me in "amateur language" what you were exactly referring to? :P – Ympker Jun 5 '15 at 20:47
  • type this: tar -tzvf teamspeak3-server_linux-x86- (using t to "type" or list the contentx, not x to extract) -- what do you see? – glenn jackman Jun 5 '15 at 21:01
  • Why the cd `pwd` ? – roaima Jun 5 '15 at 21:23

You should not cd into /root/teamspeak3-server_linux-x86. This is not where the file would have got extracted. It would have been extracted in your current location.

So, the correct script would be:

wget http://dl.4players.de/ts/releases/
tar -xzvf teamspeak3-server_linux-x86-
cd teamspeak3-server_linux-x86/
./ts3server_startscript.sh start
  • That script doesnt work for me unfortunately :( And the wget is always downloaded to "/" and not "/root/install" where i want it to be downloaded – Ympker Jun 5 '15 at 20:51
  • Well the script works now if I exec it from WinSCP via SFTP however when I exec it through my control panel (web) it doesn't work :/ – Ympker Jun 5 '15 at 20:55
  • Can I somehow download the "wget" directly to /root/install ? – Ympker Jun 5 '15 at 20:55
  • First of all, you are not downloading "wget". You are downloading a "file" using wget. And, yes, you can download it to /root/install. Just use the -P option: wget -P /root/install http://file-link.tar.gz – shivams Jun 5 '15 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.