refactor: run crontab under sudo to support rhel systems

RHEL blocks users from executing crontab as themselves Because Of Reasons so we need to use sudo instead.

Also refactors file writing to properly support writing the permissions on sudoers files going forward.

Closes #5020
This commit is contained in:
Jose Diaz-Gonzalez
2022-02-27 19:17:04 -05:00
parent 2e1df2578c
commit 257baa1d46
8 changed files with 56 additions and 8 deletions

View File

@@ -20,6 +20,8 @@ func main() {
switch trigger {
case "cron-write":
err = cron.TriggerCronWrite()
case "install":
err = cron.TriggerInstall()
case "post-delete":
err = cron.TriggerPostDelete()
case "post-deploy":