ensure config is loaded before lock

This commit is contained in:
2021-11-23 12:32:35 +01:00
parent 26de4385ea
commit 252968e15e
5 changed files with 43 additions and 30 deletions

View File

@@ -11,6 +11,7 @@ var cronCmd = &cobra.Command{
Short: "Run cron job for automated backups",
Long: `Intended to be mainly triggered by an automated system like systemd or crontab. For each location checks if a cron backup is due and runs it.`,
Run: func(cmd *cobra.Command, args []string) {
internal.GetConfig()
internal.CRON_LEAN, _ = cmd.Flags().GetBool("lean")
err := lock.Lock()
CheckErr(err)