Shell Scripting
Results 1 to 2 of 2

Thread: Shell Scripting

  1. #1
    Join Date
    Jan 2002

    Shell Scripting

    Can Some One Point Me To A Tutorial On Shell Scripting Or Help Me With My Problem?

    I Just Compiled Apache With SSL. I Also Added The 'apachectl startssl' in my 'rc.local'.
    The Problem Is When The Server Reboots And The 'rc.local' Starts 'apachectl startssl' It Askes For The Pass Phrase. The Only Time The Server Reboots Is The Power Goes Out Meaning That There Is No Body Here To Enter The Pass Phrase.

    My Question Would Be What Is A Eazy Way To Have The Pass Phrase Enter Its Self In During Boot VIA A Shell Script?

    su - root -c "/usr/local/apache/bin/apachectl startssl $PSPH"

    I Know That Will Not Work Cause That Just Basically Types '/usr/local/apache/bin/apachectl startssl passphrase' In The Command Line.

    Any Ideas Of What Commands I Need To Use.

    Thanks -Ezekiel
    There Are Four Colors Of Hats You Need To Watch Out For: Black, White, Grey, and Red. The Respective Meanings Are \"Cracker\", \"Hacker\", \"Guru\", and \"Victim\"

  2. #2
    Senior Member
    Join Date
    Jun 2002
    there may be an parametized feature within the module that would avoid the issue - but, if not the answer will depend on specialized term characters. i would suggest taking a look at expect ( which is really more suited for things of this nature.

    it may be that you can get away with a simple:

    su - root -c /usr/local/apache/bin/apachectl startssl <<PASSPHRASE_END

    but i suspect that this will just hang waiting on appropriate input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts