mirror of
https://github.com/dokku/dokku.git
synced 2025-12-16 12:07:45 +01:00
We will no longer support CentOS, Fedora, and Opensuse as installation targets. These are not actively maintained by anyone with commit rights and occasionally cause issues for users as they are not tested during the release process. Rather than have subpar support for an untested operating system, we're removing support for them completely. Users of these operating systems should take a look migration to the docker-based installation method, which will always be tested and supported by the project. Additionally, drop support for Debian 9 as it is now EOL.
27 lines
676 B
Go
27 lines
676 B
Go
package cron
|
|
|
|
import (
|
|
"github.com/dokku/dokku/plugins/common"
|
|
)
|
|
|
|
// TriggerInstall installs a sudoers file so we can execute crontab via sudo
|
|
func TriggerInstall() error {
|
|
lines := []string{"%dokku ALL=(ALL) NOPASSWD:/usr/bin/crontab"}
|
|
return common.WriteSliceToFile("/etc/sudoers.d/dokku-cron", lines)
|
|
}
|
|
|
|
// TriggerPostDelete updates the cron entries for all apps
|
|
func TriggerPostDelete() error {
|
|
return writeCronEntries()
|
|
}
|
|
|
|
// TriggerPostDeploy updates the cron entries for all apps
|
|
func TriggerPostDeploy() error {
|
|
return writeCronEntries()
|
|
}
|
|
|
|
// TriggerCronWrite force updates the cron file for all apps
|
|
func TriggerCronWrite() error {
|
|
return writeCronEntries()
|
|
}
|