Operating System - HP-UX
1832864 Members
2837 Online
110048 Solutions
New Discussion

Re: automatic start of netscape https server

 
Roberto Gallis
Regular Advisor

automatic start of netscape https server

Hi all,
I need to create a script to automatic launch netscape https server.
Netscape has a script start to launch the server, but you need to enter a password for the certificate.
I think I need to pass the password from a file (maybe crypted with crypt) and put it on /sbin/init.d ana a S900 link on /sbin/


start script is:

#!/bin/sh

SERVER_ROOT=/usr/netscape/suitespot
PRODUCT_NAME=https
PRODUCT_BIN=uxwdog
PRODUCT_SUBDIR=/usr/netscape/suitespot/https-open1

cd $SERVER_ROOT/bin/$PRODUCT_NAME
./$PRODUCT_BIN -d $PRODUCT_SUBDIR/config $@
if test $? -ne 0 ; then
exit 1
fi
dcfe02:/usr/netscape/suitespot/https-open1#>more start
#!/bin/sh

SERVER_ROOT=/usr/netscape/suitespot
PRODUCT_NAME=https
PRODUCT_BIN=uxwdog
PRODUCT_SUBDIR=/usr/netscape/suitespot/https-open1

cd $SERVER_ROOT/bin/$PRODUCT_NAME
./$PRODUCT_BIN -d $PRODUCT_SUBDIR/config $@
if test $? -ne 0 ; then
exit 1
fi


How can I implement my automatic script?

Regards
Roberto
4 REPLIES 4
Steven Sim Kok Leong
Honored Contributor

Re: automatic start of netscape https server

Hi,

Use Expect. Based on a substring of the "expected" output such as "password: ", you can use Expect to key in the password in the password field for you.

Example:
=====================================
#!/usr/bin/expect

spawn netscape-server-startup
expect "password: "
send "abcdef\n"
close
=====================================

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Roberto Gallis
Regular Advisor

Re: automatic start of netscape https server

Sorry,
what's expect? is a unix command? I can't find it...
Bill Hassell
Honored Contributor

Re: automatic start of netscape https server

expect is a freeware progam that's available from the HP-UX Liverpool archive:

hpux.connect.org.uk

Other useful programs for HP-UX sysadmins:

lsof and sudo


Bill Hassell, sysadmin
Roberto Gallis
Regular Advisor

Re: automatic start of netscape https server

I've studied the netscape documentation
To start ssl server at boot you need to build password.conf in the ssl server config directory.
That's all

Best Regards

Roberto