Writing an upstart file which allows the user to input username and password

Posted by Robert Munteanu on Server Fault See other posts from Server Fault or by Robert Munteanu
Published on 2013-11-01T14:17:41Z Indexed on 2013/11/01 15:59 UTC
Read the original article Hit count: 290

Filed under:
|
|

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?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about upstart