I suppose since it is not done natively, its because there seem to be a good reason...
You could bypass my lack of collaboration on this point (/etc/inittab) by writing a job run by cron to check if httpd is there, and if not, warns you ... ( or restart...).
Depending on exactly how initd is implemented, this inittab line might work, assuming you want httpd running in run levels 3, 4, and 5:
I'm assuming you're going to need a script to set up the proper environment. I'd also make sure the script either exec's the httpd, or waits for it to finish, because if the script process ends but leaves the httpd process running initd will probably start another copy of httpd.
You might also need to add some SIGTERM or SIGQUIT handling to your script if it doesn't exec the httpd process.
I compiled apache 2.2.15 from source and installed it. When I try to start it, its not coming up.
# ./httpd -k start
# echo $?
1
# ps -ef | grep httpd | grep -v grep
#
# ./httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Dec 13 2013 04:31:41When I run it in gdb I am... (4 Replies)
I encountered a problem on one of our database servers.
OS: CentOS 5.5 final
Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel)
We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Hi,
I am experiencing a weird thing on my SUNFIRE machine with Solaris 9 OS.
When I do init 0 to shutdown the machine to go to ok prompt, what it did was shutdown and reboot like an init 6 command do. I did check the corresponding rc scripts that were involved with init 0 and compared with rc... (2 Replies)
What is the difference between 'init s' and 'init 1'.
I know that both will work to change the current run level to single user mode.
Is there any difference in those two commands? (5 Replies)
Dear all,
I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel):
1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins
So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Hi All,
I have started my processes through SMF functionality.
It gets started successfully.
But when I kill my processes, it's getting restarted. But in Solaris 9 and below if I kill it will not get restarted.
In Solaris 10 it should not get restarted L
How can I perform the operation... (5 Replies)
Hi,
I am working on Solaris 8 on sunblade 150 machine.I have a java code jar file which I have configured in inittab to respawn.When I kill the process as per the respawn property the new process id gets generated.If I keep killing the process after 4-5 tries the process does not respawn.Sometimes... (0 Replies)
Hi Expert,
I have encountered some problem with my SUN system. Everytime when i issue command #init 6 OR #init 0 it just logout and prompt for login again instead of rebooting the server when run init 6 and system shutdown when run init 0..
I can only reboot the system using reboot ... Was... (6 Replies)