[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Handle-info] handle start stop on boot scripts
Here is an example how a working Expect script can look like:
File shdl.exp:
--------------------
#!/usr/bin/expect -f
set timeout 30
# set to 1 to force conservative mode even if
# script wasn't run conservatively originally
set force_conservative 1
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}
spawn java -cp
"/opt/hs/bin/handle.jar:/usr/share/pgsql/postgresql-8.1-404.jdbc3.jar"
net.handle.server.Main /opt/hs/svr_1
match_max 100000
expect {
-regexp {.*Your passphrase will be displayed as it is entered.*\r} {
send -- "keyspassword\r"
}
}
# expect eof
# interact
# exit
# wait until spawned termination
wait
---------------------
Regards!
On Sun, 2007-06-24 at 12:31 +0200, Konstantin Rekk wrote:
> Hello,
>
> trying to compose a script for Suse Linux to startup Handle Server on
> boot: the problem is of course to provide the keys password to the
> startup dialog. In such cases it is possible to use expect.
>
> But is there a simpler solution: config file settings, introducing kind
> of --password option for net.handle.server.Main ?
>
> Thanks for any hint!
>
>
--
Konstantin Rekk
VZG (GBV), Göttingen, Berlin
0176 2100 6000
030 29003511
skype: krekk1970
rekk@gbv.de
http://www.gbv.de
_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info