deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.41k stars 1.47k forks source link

Crontab: allow sudo with crontab:use_sudo option #3759

Closed jkarwasz-portavice closed 6 months ago

jkarwasz-portavice commented 6 months ago

This makes it possible to overwrite the bin/crontab variable to edit crontab for other users.

e.g.

set("crontab:use_sudo", true);
set("bin/crontab", function () {
  return which('crontab') . " -u www-data";
});