PDA

View Full Version : little improvement to teamspeak2-server_startscript


muzzol
30-10-2005, 23:26
bones!

this is a little modification that can help all that people using /etc/init.d start-stop scripts. the problem is all commands in this script are relative to root install directory, so you can't start it. a simple cd /path_to_dir can work, but with three line you can autodetect where dir resides.

you must add just before

case "$1" in

following lines

REALF=`readlink "$0"`
DIRTS=`dirname "$REALF"`
cd "$DIRTS"

and do a ln -s from real location to /etc/init.d

thats all!