In a shell/bash script (I use it for vagrant provision), I configure apache2 server and then restart it. But since I use a key file for https, apache asks for a password. How can I automate this and tell the script my password. Could this be done with something like this?
sudo apachectl restart <<< "mypassword"
(Set aside any security issues: this is only for development and vagrant is insecure by default)
P.S. I really don't want to install any additional software, since script should be as lean as possible.