Unix Technical Forum

Starting up teamspeak server on boot

This is a discussion on Starting up teamspeak server on boot within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hello I have a teamspeak server I'd like to start as a specific user on boot. What would be ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 02:07 PM
Morten Lundstrøm
 
Posts: n/a
Default Starting up teamspeak server on boot

Hello

I have a teamspeak server I'd like to start as a specific user on boot.

What would be the secure and correct way to do this?
Make a rc.teamspeak script and sudo it on bootup?

Thanks
Morten


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 02:07 PM
Kojak
 
Posts: n/a
Default Re: Starting up teamspeak server on boot

Morten Lundstrøm wrote:
> Hello
>
> I have a teamspeak server I'd like to start as a specific user on boot.
>
> What would be the secure and correct way to do this?
> Make a rc.teamspeak script and sudo it on bootup?


I have tss:tss as user:group and this in /etc/rc.d/rc.tss:

#!/bin/sh

WORKDIR='/usr/local/share/tss'
TSS_BIN='teamspeak2-server_startscript'

cd $WORKDIR

case "$1" in
start)
sudo -u tss $WORKDIR/$TSS_BIN start
;;
stop)
sudo -u tss $WORKDIR/$TSS_BIN stop
;;
restart)
$0 stop && $0 start
;;
status)
sudo -u tss $WORKDIR/$TSS_BIN status
;;
passwords)
sudo -u tss $WORKDIR/$TSS_BIN passwords
;;
*)
echo "Usage: $0 {start|stop|restart|status|passwords}"
;;
esac


ciao
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 02:08 PM
William Hunt
 
Posts: n/a
Default Re: Starting up teamspeak server on boot

On Thu, 19 Jan 2006, Morten Lundstrøm wrote:
> I have a teamspeak server I'd like to start as a specific user on boot.
> What would be the secure and correct way to do this?
> Make a rc.teamspeak script and sudo it on bootup?


idunno the transpeak server, but in general, the simplest
way is to add the proper commands to /etc/rc.d/rc.local.
no need to use sudo for anything here. all the startup
scripts run with root permissions already.

if you want to have start/stop/resart control of the
server, then make yourself some /etc/rc.d/rc.transpeak like:
--------------------
#!/bin/bash
case "$1" in
start)
echo "put start command here"
;;
stop)
echo "put stop command here"
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "put syntax errmsg here"
;;
esac
#the end.
--------------------

run it at boottime by simply calling it from your
/etc/rc.d/rc.local file, something like:

# start transpeak server:
/etc/rc.d/rc.transpeak start



'sokay?

--
William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 02:08 PM
Morten Lundstrøm
 
Posts: n/a
Default Re: Starting up teamspeak server on boot


"William Hunt" <wjh@prv8.net> skrev i en meddelelse
news:Pine.LNX.4.62.0601200649470.18147@worker.prv8 .net...
On Thu, 19 Jan 2006, Morten Lundstrøm wrote:
> I have a teamspeak server I'd like to start as a specific user on boot.
> What would be the secure and correct way to do this?
> Make a rc.teamspeak script and sudo it on bootup?


idunno the transpeak server, but in general, the simplest
way is to add the proper commands to /etc/rc.d/rc.local.
no need to use sudo for anything here. all the startup
scripts run with root permissions already.

But I don't want it to have root permissions? It should be run as a
restricted user...

/Morten


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 02:08 PM
Morten Lundstrøm
 
Posts: n/a
Default Re: Starting up teamspeak server on boot


"Kojak" <kojak@freemail.it> skrev i en meddelelse
news:9C%zf.40790$av6.19445@tornado.fastwebnet.it.. .
> Morten Lundstrøm wrote:
>> Hello
>>
>> I have a teamspeak server I'd like to start as a specific user on boot.
>>
>> What would be the secure and correct way to do this?
>> Make a rc.teamspeak script and sudo it on bootup?

>
> I have tss:tss as user:group and this in /etc/rc.d/rc.tss:
>
> #!/bin/sh
>
> WORKDIR='/usr/local/share/tss'
> TSS_BIN='teamspeak2-server_startscript'
>
> cd $WORKDIR
>
> case "$1" in
> start)
> sudo -u tss $WORKDIR/$TSS_BIN start
> ;;
> stop)
> sudo -u tss $WORKDIR/$TSS_BIN stop
> ;;
> restart)
> $0 stop && $0 start
> ;;
> status)
> sudo -u tss $WORKDIR/$TSS_BIN status
> ;;
> passwords)
> sudo -u tss $WORKDIR/$TSS_BIN passwords
> ;;
> *)
> echo "Usage: $0 {start|stop|restart|status|passwords}"
> ;;
> esac
>
>
> ciao


Excellent, this was exactly what I needed!

/Morten


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 02:08 PM
Trygve Selmer
 
Posts: n/a
Default Re: Starting up teamspeak server on boot

William Hunt wrote:
>
>
> idunno the transpeak server, but in general, the simplest
> way is to add the proper commands to /etc/rc.d/rc.local.
> no need to use sudo for anything here. all the startup
> scripts run with root permissions already.
>
> if you want to have start/stop/resart control of the
> server, then make yourself some /etc/rc.d/rc.transpeak like:
> --------------------
> #!/bin/bash
> case "$1" in
> start)
> echo "put start command here"
> ;;
> stop)
> echo "put stop command here"
> ;;
> restart)
> $0 stop
> sleep 1
> $0 start ;;
> *)
> echo "put syntax errmsg here"
> ;;
> esac
> #the end.
> --------------------
>
> run it at boottime by simply calling it from your
> /etc/rc.d/rc.local file, something like:
>
> # start transpeak server:
> /etc/rc.d/rc.transpeak start


or rather:

# start transpeak server:
if [ -x /etc/rc.d/rc.transpeak ]; then
/etc/rc.d/rc.transpeak start
fi

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 02:10 PM
Flossie
 
Posts: n/a
Default Re: Starting up teamspeak server on boot


"Trygve Selmer" <trselmer@start.no> wrote in message
news:43D196E8.7030707@start.no...
> William Hunt wrote:
> >
> >
> > idunno the transpeak server, but in general, the simplest
> > way is to add the proper commands to /etc/rc.d/rc.local.
> > no need to use sudo for anything here. all the startup
> > scripts run with root permissions already.
> >
> > if you want to have start/stop/resart control of the
> > server, then make yourself some /etc/rc.d/rc.transpeak like:
> > --------------------
> > #!/bin/bash
> > case "$1" in
> > start)
> > echo "put start command here"
> > ;;
> > stop)
> > echo "put stop command here"
> > ;;
> > restart)
> > $0 stop
> > sleep 1
> > $0 start ;;
> > *)
> > echo "put syntax errmsg here"
> > ;;
> > esac
> > #the end.
> > --------------------
> >
> > run it at boottime by simply calling it from your
> > /etc/rc.d/rc.local file, something like:
> >
> > # start transpeak server:
> > /etc/rc.d/rc.transpeak start

>
> or rather:
>
> # start transpeak server:
> if [ -x /etc/rc.d/rc.transpeak ]; then
> /etc/rc.d/rc.transpeak start
> fi
>


Hi,

But how do you make teamspeak run on a specific user account and NOT root ?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:41 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com