Solaris Startup script for Apache.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Solaris Startup script for Apache.
# 1  
Old 07-26-2006
Solaris Startup script for Apache.

I'm running Solaris 5.9 and Apache 2....

I've created a startup script for Apache....but it doesn't work!!!

it resides in /etc/init.d and has a link to /etc/rc3.d

and if it run it as /etc/init.d/apache_start stop it stops the httpd services and /etc/init.d/apache_start start starts the httpd services; however if I reboot the server the httpd services are not started....

I humbly submit my script.... thanking you all inadvance....

Code:
#!/bin/sh

#
# Startup script for Apache
#
if [ ! -d /data/apache ]
then
        # No point in going any further
        exit
fi

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

# Start/stop apache web server

case "$1" in
'start')
        /data/apache/bin/apachectl start
        ;;
'stop')
        /data/apache/bin/apachectl stop
        ;;
*)
        echo "Usage: /etc/init.d/apache_start { start | stop }"
        ;;
esac


Last edited by reborg; 07-26-2006 at 07:47 AM..
# 2  
Old 07-26-2006
What are the names of the links? And, what's your default run level?
# 3  
Old 07-26-2006
hi,

So...

in /etc/init.d
-rwxr-xr-x 1 root root 450 Jul 25 16:10 apache_start

and in /etc/rc3.d
lrwxrwxrwx 1 root root 24 Jul 26 12:10 S99apache -> /etc/init.d/apache_start
# 4  
Old 07-26-2006
mmmm... run "who -r" or "grep initdefault /etc/inittab" and check your default runlevel, if it's not 3 put the link in /etc/rc2.d (or in your default runlevel).
In Solaris, runlevel 3 is, usually, for x-windows and nfs services...
Regards.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

JVM startup script in Solaris

Hi, I've installed dynatrace on a SunOS(5.10) & I need to update its agent path in JVM start up script. Where can I find or which script starts JVM? Some Details here : Java location : /<server location>/oracle/forms/FRHome_1/jdk/jre/bin Please help me in this. I did some research... (2 Replies)
Discussion started by: raj100
2 Replies

2. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

3. Solaris

Solaris 10 startup scripts

Hi all, I have a server in maintenance mode and need to boot it up. Its due to a broken service "RepX". I need to stop the service from trying to start at boot up but i can't find where it is booting up from... it is not in any of the rcX.d directories and the two locations i have found it... (6 Replies)
Discussion started by: Tommyk
6 Replies

4. Solaris

Is there a way to debug the startup on Solaris?

Is there a way to debug the startup on a VT100 running Solaris 5? I have a problem related to file attributes that are resetting to there prior settings when the machine reboots. (3 Replies)
Discussion started by: jimcz2it
3 Replies

5. Shell Programming and Scripting

Single Startup script for Apache/jboss

Hi, I have apache ,jboss and jon instances on various linux boxes.I need to create a generic startup script to restart those instances on server reboot.The script requirement is : It should take the name of instances from one text file named active-servers and recycle those instances. 1.... (6 Replies)
Discussion started by: saurau
6 Replies

6. Shell Programming and Scripting

Apache Startup Fails with PHP Error

Great tins massive! Im Manqoba from Midrand, South Africa... I have installed Apache and PHP on a solaris 9 box, using the packages below: apache-2.2.14-sol9-sparc-local php-5.2.13-sol9-sparc-local After installing the packages I edited my httpd.conf file, to load the php5 module when... (10 Replies)
Discussion started by: Macarena S.A
10 Replies

7. Solaris

Nis startup in Solaris 8

Hello How can I check to see when nis server is starting? I look at /etc/rc2.d/ but I don't see it in there. Every time we have power outage problem. I have to start autof service manual. So I think it might have to do with nis server services. (1 Reply)
Discussion started by: congngo
1 Replies

8. Solaris

VirtualBox Startup Script Solaris 10 U6

I have an Ultra 24 with Solaris 10 U6 with the latest patches. I'm running VirtualBox 2.1.0 with Windows 2003 as the guest. What I'm trying to do is have the Windows VM start at Solaris startup. I had a simple script that was working that was in /etc/init.d and linked to /etc/rc3.d. For some reason... (2 Replies)
Discussion started by: Lespaul20
2 Replies

9. Solaris

X server startup on Solaris 9

Hi, I have Solaris 9 installed on a SunFire V880. When the machine boots up, I get a message, "the X-server cannot be started on display:0". I searched the forum for possible solution, however, they are not applicable to my problem for two reasons: either the platform is different or the... (6 Replies)
Discussion started by: purveshkhatri
6 Replies

10. Shell Programming and Scripting

[Help] startup script on solaris 8

hi experts, i have some problem with my solaris 8 v890 server, is : the server running process called SS7 below is example process : PID STAT MODE HOST MUX OBJECT 384 ok LX|A USSDGmdn-1a spm/0 daemon 385 ok LX|A USSDGmdn-1a spm/2 ... (0 Replies)
Discussion started by: bucci
0 Replies
Login or Register to Ask a Question