LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-23-2009, 04:40 PM   #1
dennismonsewicz
LQ Newbie
 
Registered: Apr 2009
Location: Tenessee
Distribution: ubuntu 8.x
Posts: 6

Rep: Reputation: 0
Shell Script Question


I am writing a shell script (I am a complete newb) that is supposed to call another script upon booting up linux

Code:
#!/bin/sh

/work/projects/liferay/tomcat/bin/ . startup.sh &
I am receiving the following error:

/work/projects/liferay/tomcat/bin/: Permission denied

The second line of code above is to start the Tomcat service and is supposed to start the service and then boot up Firefox showing Liferay (An open source CMS built on JAVA).

I have checked ALL the permissions on that particular folder (bin) and have even blown them wide open starting at the root dir of /work.

Any help?
 
Old 04-23-2009, 04:48 PM   #2
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 306

Rep: Reputation: 37
Looks like you haven't got that correct

Code:
/work/projects/liferay/tomcat/bin/startup.sh &
 
Old 04-23-2009, 04:51 PM   #3
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,488

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
In Linux the first word you type in the command line (or when executing a command in a shell script) must be always the name of a command (be it an external command or a shell built-in). In your line of code, the first word is a directory name which is wrong since you cannot execute a directory!
 
Old 04-27-2009, 01:27 PM   #4
dennismonsewicz
LQ Newbie
 
Registered: Apr 2009
Location: Tenessee
Distribution: ubuntu 8.x
Posts: 6

Original Poster
Rep: Reputation: 0
I actually got everything working

Code:
#!/bin/bash

/work/projects/liferay/tomcat/bin/startup.sh
Then I set the session for when my ubuntu instance starts up to start the tomcat service

I am very excited lol.

Thanks for all of the help!
 
  


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
shell script question icecubeflower Linux - Newbie 4 03-31-2009 06:24 AM
Shell Script Question. rvijay Linux - General 2 07-14-2005 06:41 PM
shell script question rrwhite Linux - General 3 09-15-2004 01:01 AM
Shell Script Question swinchen Programming 1 08-20-2004 02:09 PM
Help me!!!!!shell script question!!!!!! yulitao Programming 2 03-23-2004 03:40 PM


All times are GMT -5. The time now is 01:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration