The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sth wrong of gcc zither AIX 2 01-02-2008 01:57 AM
can someone tell me what im doing wrong here iago UNIX for Dummies Questions & Answers 2 09-10-2007 10:20 AM
Whats wrong with the syntax dsravan Shell Programming and Scripting 4 08-10-2006 06:41 PM
what am i doing wrong jzocco Shell Programming and Scripting 1 05-25-2006 04:55 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-24-2006
coolboarderguy coolboarderguy is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 7
. $startApache wrong syntax?

Hi All,

why doesn't this code start apache at boot?

Cheers.

coolboarderguy...

startApache=/usr/local/apache2/bin/apachectl start
if [ -f "$startApache" ] ; then
. $startApache
fi
  #2 (permalink)  
Old 06-25-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,969
Try removing that .
  #3 (permalink)  
Old 06-25-2006
Ambikesh Ambikesh is offline
Registered User
  
 

Join Date: Feb 2006
Location: California
Posts: 45

Code:
startApache="/usr/local/apache2/bin/apachectl start"
if [ -f "$startApache" ] ; then
. $startApache
fi

OR


Code:
action=start
apache="/usr/local/apache2/bin/apachectl"
if [ -f "$apache" ] ; then
. $apache $action
fi

  #4 (permalink)  
Old 06-26-2006
coolboarderguy coolboarderguy is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 7
Quote:
Originally Posted by Ambikesh
Code:
startApache="/usr/local/apache2/bin/apachectl start"
if [ -f "$startApache" ] ; then
. $startApache
fi

OR


Code:
action=start
apache="/usr/local/apache2/bin/apachectl"
if [ -f "$apache" ] ; then
. $apache $action
fi
Hi All,

the 1st one didn't work, but the 2nd one did. Why wouldn't the 1st one work? Cheers.

coolboarderguy...
  #5 (permalink)  
Old 06-26-2006
Ambikesh Ambikesh is offline
Registered User
  
 

Join Date: Feb 2006
Location: California
Posts: 45
Should work budy..
Any specific error...
  #6 (permalink)  
Old 06-26-2006
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,245
Of course it didn't work, there is no file called "/usr/local/apache2/bin/apachectl start"
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0