What I'm trying to achieve is, to reload php7.2-fpm
service via php-deployer.
According to php-deployer's documentation, it can be done like the code below:
task('reload:php-fpm', function () {
run('sudo /usr/sbin/service php7-fpm reload');
});
after('deploy', 'reload:php-fpm');
However, I face the error below while deploying:
➤ Executing task deploy:reload_php_fpm
↳ on [prod]
sudo service php7.2-fpm reload
In PhpSecLib.php line 124:
[RuntimeException]
sudo: no tty present and no askpass program specified
System info:
PHP Version 7.2
Ubuntu 18.04 LTS
PHP-Deployer Version 6.3.0
Do you have any idea how can I solve this issue?