Writing an upstart file which allows the user to input username and password
- by Robert Munteanu
I'm trying to write an upstart file for OpenConnect. The task is pretty simple, but I'm stuck because I don't want to provide the username and password in a config file, but prompt the user to provide them each time.
The upstart file, placed in /etc/init/openconnect.conf is
exec /usr/sbin/openconnect --script=/etc/vpnc/vpnc-script my-gw.example.com
However, when I execute
start openconnect
the process is backgrounded immediately and I get no chance to provide input.
How can I make this upstart job ask the user for input?