I am using expect to submit a PEM passphrase for httpsd. I have the httpsd
script call a little expect script that starts httpsd and supplies the
password.
For some reason, although expect is starting httpsd just fine, it seems to
die right away:
________________________________________________________
[Mon Nov 5 17:07:30 2001] gcache started
[Mon Nov 5 17:07:30 2001] gcache started
[Mon Nov 5 17:07:30 2001] [notice] Apache/1.3.12 Ben-SSL/1.40 (Unix)
configured
-- resuming normal operations
[Mon Nov 5 17:13:40 2001] [notice] caught SIGTERM, shutting down
________________________________________________________
If I start httpsd manually and enter the password manually, it starts fine
and stays alive.
My expect script resembles several example scripts that are supposed to
work; am I missing something obvious?
________________________________________________________
#!/usr/bin/expect
set pass "password"
spawn /usr/sbin/httpsd -DSSL -f /etc/httpsd/conf/httpsd.conf
set send_slow {1 .1}
expect "*rase:"
sleep .1
send "$pass\r"
expect "pid="
sleep .1
expect eof
________________________________________________________
Thanks.