LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2004, 10:20 AM   #1
richie72
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
script problem changing directories


ok heres the issue i have set up a remote linux server which i have installed medal of hour games on

and i have wrote a script to start the servers ruuning

the only problem is this

script

#!/bin/sh

cd /home/servers

screen -dmS server1 ./mohaa_lnxded

it falls down on first part as it is not changing dir like i am telling it to

i have chmodded this file to 755 so i can run it also the dir are chmodded to 777

the server is running red hat

is there another way of doing this or is there somethink missing from the server install that stops this script from running

i know the game server works as if i change into the dir i can type in the

screen -dmS server1 ./mohaa_lnxded

and the server starts up

please help as head hurting from hitting head against solid object
 
Old 04-15-2004, 11:20 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Try using set -x to check which lines of your script are run and which are not ('debugging').

Code:
#!/bin/sh
set -x
cd /home/servers
screen -dmS server1 ./mohaa_lnxded
PS: Don't open your box more then is needed. I hope you changed the permissions of ../servers/ to 777, not /home. Even 777 for servers is probably to open, 755 should do.
 
Old 04-15-2004, 11:21 AM   #3
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Where do you run this script from?
From a web script or manually as a logged in user?
 
Old 04-15-2004, 03:25 PM   #4
richie72
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Original Poster
Rep: Reputation: 0
i run it from being a logged in user

like this ./start.sh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
problem changing X terminal colors with script shadowsnipes Slackware 5 10-10-2005 11:15 PM
Script to run script in multiple directories... seabass55 Linux - General 5 07-06-2004 12:44 AM
Changing Permissions on Directories... bob4432 Linux - Newbie 6 06-25-2004 02:50 PM
Persmissions changing on root directories? granatica Linux - Security 2 06-14-2004 02:52 PM
Changing physical location of directories Linus VanPelt Mandriva 2 02-23-2004 07:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:29 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