![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stop rsh in solaris | murad.jaber | SUN Solaris | 2 | 09-03-2007 07:03 AM |
| Stop DHCP in Solaris 10 | shabu | SUN Solaris | 2 | 05-29-2007 06:12 AM |
| how to stop rsh on solaris 10 | b_manu78 | SUN Solaris | 1 | 04-21-2006 08:34 AM |
| how to start and stop the network in Solaris 9?? | eldiego | UNIX for Dummies Questions & Answers | 1 | 11-21-2005 05:28 PM |
| Help: how to start/stop FTP server in solaris? | eddsos | SUN Solaris | 1 | 08-07-2005 10:32 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Solaris 10 apache2 (how to stop the restarter)
Hi
Please bear with me, I am a noob I've got a Apache2 webserver running on my Solaris 10 server, how do I stop the service restarting everytime it is invoked manually? fmri svc:/network/http:apache2 name Apache 2 HTTP server enabled true state online next_state none state_time Fri Feb 09 18:32:19 2007 logfile /var/svc/log/network-http:apache2.log restarter svc:/system/svc/restarter:default contract_id 10573 dependency require_all/error svc:/milestone/network:default (online) dependency require_all/none svc:/system/filesystem/local:default (online) dependency optional_all/error svc:/system/filesystem/autofs:default (online) Thanks in advance p Last edited by parmars; 02-12-2007 at 02:56 AM. Reason: typo |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
what exactly do you mean by: "everytime it is invoked manually"
|
|
#3
|
|||
|
|||
|
Hi
Thanks for the reply We have a set of users on this machine that stop and start apache (as sudo root) They need to be able to stop the service and make there changes (not sure what) and then restart the service via the command line. The issue they have is that as soon as they stop the service, it respawns staight away. Hope this helps? Cheers p |
|
#4
|
|||
|
|||
|
svcadm disable apache2 to stop
svcadm enable apache2 to start |
|
#5
|
||||
|
||||
|
How are they currently stopping the Apache server? The restarter will try to restart (obviously) any service that is not stopped using the svcadm facility. Make sure that the sudo users use the commands posted by sb008 to stop and start Apache.
|
|
#6
|
|||
|
|||
|
Hi
Many thanks for the reply gents. The users were set up in the sudoers file to run the following : /usr/apache2/bin/apachectl which is a shell script. Which they run parse some arguments with the command to restart the service. But it looks like this is conflicting with the built in restater process. Any thoughts around this, should I let the users have sudo access to stop/start the svadm disable/enable apache2 command, or try and figure out another way? Cheers p |
|
#7
|
|||
|
|||
|
Quote:
So your approach does indeed conflict with SMF. It is better to use "sudo", but don't give your users direct access to svcadm because then they will be able to stop/start any process. Instead you should make 2 scripts (owned by root). 1 script for stopping Apache; with the "svcadm disable apache2" command inside and 1 script for starting Apache; with the "svcadm enable apache2" command inside Or maybe even a single script will do; with the "svcadm refresh apache2" command inside, which will allow users to restart Apache |
|||
| Google The UNIX and Linux Forums |