LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell Script Question (https://www.linuxquestions.org/questions/linux-newbie-8/shell-script-question-721257/)

dennismonsewicz 04-23-2009 04:40 PM

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?

arckane 04-23-2009 04:48 PM

Looks like you haven't got that correct

Code:

/work/projects/liferay/tomcat/bin/startup.sh &

colucix 04-23-2009 04:51 PM

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!

dennismonsewicz 04-27-2009 01:27 PM

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!


All times are GMT -5. The time now is 03:59 AM.