Remote stop and start of daemons from a CGI program

Remote stop and start of daemons from a CGI program

Post by John Savil » Sun, 28 May 2000 04:00:00



Hi,

I'm developing a web interface to a new application. The web server runs on
a Unix box with the actual application running on a remote Unix box.

I need to be able to stop and start certain application daemons from the web
interface. I felt CGI was probably the best way and to stop/start the remote
daemons use the REXEC but I don't know Unix very well and not sure if this
would work.

Has anybody done this or could offer any help I would be very grateful.

Thanks,

John

John Savill

 
 
 

Remote stop and start of daemons from a CGI program

Post by Andy » Wed, 31 May 2000 04:00:00




Quote:> Hi,

> I'm developing a web interface to a new application. The web server
runs on
> a Unix box with the actual application running on a remote Unix box.

> I need to be able to stop and start certain application daemons from
the web
> interface. I felt CGI was probably the best way and to stop/start the
remote
> daemons use the REXEC but I don't know Unix very well and not sure if
this
> would work.

> Has anybody done this or could offer any help I would be very

grateful.

Sure, it's easy. BUT you do need rsh access as the remote servers
daemon's ID from your web server ID. Once you know the full path to
the start/stop/restart command, all you have to do is execute:
rsh -l <user> <remote-server> "/usr/local/web/restart"

--
-Andy M
http://synecdoche.net/~andy

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Remote stop and start of daemons from a CGI program

Post by John Savil » Thu, 01 Jun 2000 04:00:00


Great, how is the password passed, I noticed only username.

Thanks,

John



> > Hi,

> > I'm developing a web interface to a new application. The web server
> runs on
> > a Unix box with the actual application running on a remote Unix box.

> > I need to be able to stop and start certain application daemons from
> the web
> > interface. I felt CGI was probably the best way and to stop/start the
> remote
> > daemons use the REXEC but I don't know Unix very well and not sure if
> this
> > would work.

> > Has anybody done this or could offer any help I would be very
> grateful.

> Sure, it's easy. BUT you do need rsh access as the remote servers
> daemon's ID from your web server ID. Once you know the full path to
> the start/stop/restart command, all you have to do is execute:
> rsh -l <user> <remote-server> "/usr/local/web/restart"

> --
> -Andy M
> http://synecdoche.net/~andy

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

1. cgi program which is a daemon/starting daemon from cgi

Hi,

Has anyone tried starting a daemon from a cgi program. I wrote
a daemon and it loads fin from the command line. The parent
process exits as it should and the child keeps running. But
when I try calling the program as a cgi program, the cgi
program (that is the parent process) doesn't seem to exit
until the child also exits. Does anyone know what I need to
do or how I need to write my daemon which is also a cgi
program. Now my browser hangs until the daemon terminates
instead of returning really quickly - ow at least that is
what I have expected.

I tried using nested forks and setsid() but didn't seem to
affect anything.

All help would be greatly appriciated.
--
------------------------------------------------------------

 Chief Technology Officer (CTO)  Fax:   415-547-7735
 NetJet Communications           Phone: 415-547-7730
 Web Publisher to the World      http://www.netjet.com/
 ------------------------------------------------------------

2. system declassification

3. starting daemon from cgi/cgi process that is a daemon

4. Problems with crontab

5. Stopping and starting daemons

6. Fedora has let me down....

7. Starting/stopping daemons on AIX

8. two lpd's??

9. start-stop-daemon: No such file or directory

10. How to view, stop, and start services/daemons

11. wanted: resources for portable daemon start/stop scripts

12. Enabling a non-root user to start/stop a particular daemon

13. Debian and start-stop-daemon...