diff options
Diffstat (limited to 'modules/rsync_backup')
-rw-r--r-- | modules/rsync_backup/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/rsync_backup/default.nix b/modules/rsync_backup/default.nix index 55b32bf..ff84fe3 100644 --- a/modules/rsync_backup/default.nix +++ b/modules/rsync_backup/default.nix | |||
@@ -41,6 +41,13 @@ let | |||
41 | Number of backups to keep | 41 | Number of backups to keep |
42 | ''; | 42 | ''; |
43 | }; | 43 | }; |
44 | check_command = lib.mkOption { | ||
45 | type = lib.types.str; | ||
46 | default = "backup"; | ||
47 | description = '' | ||
48 | command to check if backup needs to be done | ||
49 | ''; | ||
50 | }; | ||
44 | login = lib.mkOption { | 51 | login = lib.mkOption { |
45 | type = lib.types.str; | 52 | type = lib.types.str; |
46 | description = '' | 53 | description = '' |
@@ -128,7 +135,7 @@ let | |||
128 | -o CheckHostIP=no \ | 135 | -o CheckHostIP=no \ |
129 | -p $PORT \ | 136 | -p $PORT \ |
130 | -i ${ssh_key} \ | 137 | -i ${ssh_key} \ |
131 | $DEST backup; then | 138 | $DEST ${profile.check_command}; then |
132 | echo "Fichier de verrouillage backup sur $DEST ou impossible de se connecter" >&2 | 139 | echo "Fichier de verrouillage backup sur $DEST ou impossible de se connecter" >&2 |
133 | skip=$DEST | 140 | skip=$DEST |
134 | fi | 141 | fi |