diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-04-27 19:07:26 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-04-27 19:07:26 -0400 |
| commit | 40e757c8f01e2e706dc54a5905f6be27159808c0 (patch) | |
| tree | 24c04bbf836d0ca15fa84de19aa4cb427443720c /src | |
| parent | fabce00bc20a176fb593f6107de5c54f45cf1896 (diff) | |
| parent | b06edbda0478ed57954d716f64f6870d7ae68f63 (diff) | |
Merge commit 'b06edbda0478ed57954d716f64f6870d7ae68f63'
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Restic.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Propellor/Property/Restic.hs b/src/Propellor/Property/Restic.hs index ef867de3..64cd4091 100644 --- a/src/Propellor/Property/Restic.hs +++ b/src/Propellor/Property/Restic.hs @@ -149,17 +149,17 @@ backup' dir repo crontimes extraargs kp = cronjob where desc = val repo ++ " restic backup" cronjob = Cron.niceJob ("restic_backup" ++ dir) crontimes (User "root") "/" $ - "flock " ++ shellEscape lockfile ++ " sh -c " ++ backupcmd + "flock " ++ shellEscape lockfile ++ " sh -c " ++ shellEscape backupcmd lockfile = "/var/lock/propellor-restic.lock" - backupcmd = intercalate ";" $ + backupcmd = intercalate " && " $ createCommand : if null kp then [] else [pruneCommand] createCommand = unwords $ [ "restic" , "-r" - , val repo + , shellEscape (val repo) , "--password-file" - , getPasswordFile repo + , shellEscape (getPasswordFile repo) ] ++ map shellEscape extraargs ++ [ "backup" @@ -168,9 +168,9 @@ backup' dir repo crontimes extraargs kp = cronjob pruneCommand = unwords $ [ "restic" , "-r" - , val repo + , shellEscape (val repo) , "--password-file" - , getPasswordFile repo + , shellEscape (getPasswordFile repo) , "forget" , "--prune" ] |
