This commit is contained in:
2022-02-16 21:42:54 +01:00
parent 75160d4d6a
commit db9f5dea66
9 changed files with 43 additions and 30 deletions

View File

@@ -2,6 +2,7 @@ package cmd
import (
"github.com/cupcakearmy/autorestic/internal"
"github.com/cupcakearmy/autorestic/internal/flags"
"github.com/cupcakearmy/autorestic/internal/lock"
"github.com/spf13/cobra"
)
@@ -12,7 +13,7 @@ var cronCmd = &cobra.Command{
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")
flags.CRON_LEAN, _ = cmd.Flags().GetBool("lean")
err := lock.Lock()
CheckErr(err)
defer lock.Unlock()