On Mon, Sep 19, 2011 at 2:07 PM, Tech Newbie <tec...@yahoo.com> wrote:
> I am aware of the way to start/stop Apache via apachectl, both locally and
> remotely via SSH.
>
> Is there some generic unix API, perhaps related to /sbin/service, that I can
> remotely programmatically start Apache without exec'ing apachectl directly?
> I'm thinking since Apache is already configured in /etc/init.d, is there a
> unix API that my program can interface with, that say something like:
>   // start Apache via some API
>   service.start("Apache");
> Without my program actually exec'ing apachectl directly?

All apachectl is doing is wrapping around httpd, so you want a wrapper
for the wrapper?  What is the ultimate intent.  There are different
interfaces into services (/etc/init.d) on different versions of linux,
Ubuntu is different on newer versions then it was on old ones (service
apache2 start vs /etc/init.d/apache2 start), though they both work.

Since i always compile apache2, i've found it easiest to allow work
with apachectl directly, that way the same commands work regards of
unix/linux variant.
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to