LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-30-2004, 07:15 PM   #16
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31

ok, the simple answer is if you want to use bfsmd, setting up a separate server script won't do much good. The problem is bfsmd does not have any way to shut it down from the command line. That said, since I said I would write one, here is a script using bfsmd. Put it in a file called rc.bfsmd in your /etc/rc.d directory modifying user name and paths as appropriate:

Code:
#!/bin/sh
#
# /etc/rc.d/rc.bfsmd
#
#

case "$1" in
   'start')
      echo "starting bfsmd server" 
      su - bf1942user -c "/path/to/bfsmd/bfsmd -path /path/to/server/executable &" ;;
   'stop')
      echo "stopping bfsmd server"
      killall bfsmd ;;
   'restart')
      echo "stopping bfsmd server"
      killall bfsmd
      echo "restarting bfsmd server"
      su - bf1942user -c "/path/to/bfsmd/bfsmd -path /path/to/server/executable &" ;;
   *)
      echo "usage $0 start|stop|restart" ;;
esac
then in rc.local add this:

Code:
if [ -x /etc/rc.d/rc.bfsmd ]; then
  . /etc/rc.d/rc.bfsmd start
fi
If you want the server to start make sure rc.bfsmd is executable. If you decide you don't want it to start just remove execution permission. You don't have to do anything in close in this case since rc.0 effectively does the same thing as I am doing on stop, though at a larger scale.


I am not sure what bfsmd gives you versus starting the server with start.sh +statusMonitor 1. start.sh could be set up with a script as well, though in that case I would put it in a screen since it actually has a meaningful UI. It could also be set with a cleaner way to close, though there is nothing wrong with a killall in this case since it is using signal 15.
 
Old 07-30-2004, 07:20 PM   #17
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
Oh yeah, and welcome to LQ.org!!
 
Old 07-30-2004, 10:42 PM   #18
Munniac
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Original Poster
Rep: Reputation: 0
okay, I did all that and did a chmod 777 on the servermanager.con, but I get this error on starting the script...

2004-07-29 21:39:13 : Couldn't open ServerSettings.con file for writing! Permission denied (13) Server Manager must have write access to this file, check file permissions and attributes.


I am openeing it with user bfserver.

I am not sure what to do on that at this point. All I know is chmod and don't know how to set specific permissions on a file per user.

Help this one last time and I will quit bugging you.

P.S. thank you SO much for your help thus far. I spent a long time trying to figure that out and you made it SO easy.
 
Old 07-31-2004, 05:22 AM   #19
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
No problem. In the directory where ServerSettings.con sits do a "ls -l" and tell us what the ServerSettings.con line says. I suspect because of the directory location we might have to change the owner. So we need to compare permissions against who you are running it as. Speaking of which, who are you running it as?

Let's get it working first, but I would suggest using a umask of 744.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 02:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 09:40 PM
startup script Circuit Monkey Linux - Newbie 2 04-13-2005 01:45 PM
Startup Script djinniyah Linux - Newbie 3 09-18-2003 05:20 AM
startup script c0c0deuz Linux - Newbie 3 03-29-2003 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration