On Sun, 13 Jul 2003 18:05:03 -0600
[EMAIL PROTECTED] wrote:
> OT: How to recursively call a script?
>
>
>
>
> I've got a Solaris box, and I need to remotely restart the
> ssh daemon. On Debian, most init scripts have a "restart"
> option. Solaris apparently doesn't (what's with that?!).
>
> The script looks roughly like this:
>
> #!/bin/sh
>
> case $1 in
> 'start')
> � /usr/local/sbin/sshd
> � ;;
> 'stop')
> � {code to stop the PID of sshd}
> � ;;
> esac
>
> I'd like to add a stanza like:
>
> 'restart')
> � /etc/init.d/sshd stop
> � /etc/init.d/sshd start
> ;;
>
why not just do:
'restart')
� {code to stop the PID of sshd}
� /usr/local/sbin/sshd
� ;;
> 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 luck,
chris
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]