restart apache
I need to restart apache after deploy because it seems symlinks are still cached for a little while (has no one noticed this?? - at least when you use .htaccess rewriting).
So, my current deploy is as the user. At the final step I need to su to root so that I can restart apache. How can I do that? (password should be typed in). thanks.
It's the same like restart PHP FPM. See https://github.com/deployphp/docs/blob/master/examples.md
You muck config sudo passwordless for deploy user.
After that, make a task like restart php_fpm and run it after deploy finished.
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=sudo+passwordless