#!/bin/bash
#!/usr/bin/expect
# http://mkreder.com/2011/06/18/backup-script/

echo is not yet configured
exit -1	# is not yet configured


if $argc<1 {
   send_user "usage: \n"
   send_user "$argv0 password \n"
   send_user ""
   exit
}

spawn sudo /usr/sbin/openvpn --config /etc/openvpn/openvpn.conf  --daemon
expect "Enter Private Key Password:"
send "[lindex $argv 0]\r"
interact


syntax highlighted by Code2HTML, v. 0.9.1