[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: How to recursively call a script?

Chris Adams wrote:

On Sun, 13 Jul 2003 18:05:03 -0600
westk@acu.edu wrote:

OT: How to recursively call a script?
I'd like to add a stanza like:
Ê /etc/init.d/sshd stop
Ê /etc/init.d/sshd start

why not just do:
Ê {code to stop the PID of sshd}
Ê /usr/local/sbin/sshd
Ê ;;

Well, duh! That's an obvious idea; why didn't I think of it?
Thanks, Chris, I'll give a try later on today.
(I wonder where those garbage characters (Ê) came from . . . we're switching to a new webmail system, and I typed spaces, but something mangled them.)

Secondly, assuming the script is made to work, will it work remotely, or will the process be killed when the sshd daemon goes down because it's a process spawned from an incoming ssh connection that's a "sub-process" of that sshd daemon?

It will not kill the sshd child processes.  You can safely perform this action remotely.
Good; that'll make life much easier.


Kent West (westk@acu.edu)

Reply to: