Stinovlas
08-05-2007, 16:33
Hello. I need some help with starting ts2 server on Fedora Core 6 just after reboot. I have already done the script with screen:
#!/bin/bash
process=`ps auxw | grep "port 8767" | grep -v grep | awk '{print $11}'`
if [ -z "$process" ]; then
echo Co to zas robis s TS serverem?
cd /servers/ts2
screen -A -m -d -S ts ./teamspeak2-server_startscript &
echo "Konec"
else screen -r ts
fi
but I don't know, how to let it login any other user (username: ts2, pass: teamspeak)? Thx a lot..
EDIT: ppl on #fedora @quakenet.org already helped me.. so, here it is:
(16:37:38) (@_35i-Pilot_) place it in init.d
(16:38:21) (@_35i-Pilot_) an set the owner of the script to eg. "ts-user"
(16:38:44) (@_35i-Pilot_) /etc/init.d/ts-script
(16:38:47) (@_35i-Pilot_) ;)
(16:39:12) (@_35i-Pilot_) must have the x attrib
EDIT #2: well, this didnt help, can somebody else help me?
#!/bin/bash
process=`ps auxw | grep "port 8767" | grep -v grep | awk '{print $11}'`
if [ -z "$process" ]; then
echo Co to zas robis s TS serverem?
cd /servers/ts2
screen -A -m -d -S ts ./teamspeak2-server_startscript &
echo "Konec"
else screen -r ts
fi
but I don't know, how to let it login any other user (username: ts2, pass: teamspeak)? Thx a lot..
EDIT: ppl on #fedora @quakenet.org already helped me.. so, here it is:
(16:37:38) (@_35i-Pilot_) place it in init.d
(16:38:21) (@_35i-Pilot_) an set the owner of the script to eg. "ts-user"
(16:38:44) (@_35i-Pilot_) /etc/init.d/ts-script
(16:38:47) (@_35i-Pilot_) ;)
(16:39:12) (@_35i-Pilot_) must have the x attrib
EDIT #2: well, this didnt help, can somebody else help me?