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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
| 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 |
| |||
| "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 |
| |||
| "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 |
| |||
| 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 |
| ||||
| "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 ? |