mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-06 10:30:39 +00:00
Add PreValidate hook (#359)
Fix #332. This adds a new "PreValidate" hook that is executed before checking the backup location. This allows, for example, mounting a remote source to make the directories of the location available. "PreValidate" is added as a new hook to avoid any breakage that might have been caused by changing the behaviour of the "before" hook. Documentataion updates included.
This commit is contained in:
committed by
GitHub
parent
bbb1c85cad
commit
13aa560fda
@@ -132,10 +132,11 @@ func (c *Config) Describe() {
|
||||
|
||||
tmp = ""
|
||||
hooks := map[string][]string{
|
||||
"Before": l.Hooks.Before,
|
||||
"After": l.Hooks.After,
|
||||
"Failure": l.Hooks.Failure,
|
||||
"Success": l.Hooks.Success,
|
||||
"PreValidate": l.Hooks.PreValidate,
|
||||
"Before": l.Hooks.Before,
|
||||
"After": l.Hooks.After,
|
||||
"Failure": l.Hooks.Failure,
|
||||
"Success": l.Hooks.Success,
|
||||
}
|
||||
for hook, commands := range hooks {
|
||||
if len(commands) > 0 {
|
||||
|
Reference in New Issue
Block a user