How would you go about restarting apache?
running command 'sudo systemctl restart apache2' hangs as it's waiting for a password.
My scripts deploys to multiple domains with multiple passwords (same SSH key though).
I do have:
set :ssh_options, "-A" and I can add set :forward_agent, true
I realize echoing the password into sudo with -S (echo <password> | sudo -S ...) would work, but it's ugly.
In case you're wondering, I need to restart Apache2 after I deploy since I have symlinks that get screwed up when a new deploy is pushed.
I'm open minded about somehow getting Apache to realize the changes without restarting it, and any other way to restart it if I must.
How would you go about restarting apache? running
command 'sudo systemctl restart apache2'
hangs as it's waiting for a password. My scripts deploys to multiple domains with multiple passwords (same SSH key though).I do have: set
:ssh_options, "-A"
and I can addset :forward_agent, true
I realize echoing the password into sudo with -S (
echo <password> | sudo -S ...
) would work, but it's ugly.In case you're wondering, I need to restart Apache2 after I deploy since I have symlinks that get screwed up when a new deploy is pushed.
I'm open minded about somehow getting Apache to realize the changes without restarting it, and any other way to restart it if I must.
Help is much appreciated!