summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/zfssnap/zfssnap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py
index 76a7727c..6daf11ff 100644
--- a/modules/zfssnap/zfssnap.py
+++ b/modules/zfssnap/zfssnap.py
@@ -229,10 +229,14 @@ def autosnap():
229 _log_cmd(*args) 229 _log_cmd(*args)
230 subprocess.run(args, check=True) 230 subprocess.run(args, check=True)
231 231
232 do_snapshot(*single) 232 if single:
233 do_snapshot(*recursive, recursive=True) 233 do_snapshot(*single)
234 if recursive:
235 do_snapshot(*recursive, recursive=True)
234 for snap in all_snap_names: 236 for snap in all_snap_names:
235 logger.info(f'Created ‘{snap}’') 237 logger.info(f'Created ‘{snap}’')
238 else:
239 logger.warn('No snapshots to create')
236 rename(snapshots=all_snap_names) 240 rename(snapshots=all_snap_names)
237 241
238def main(): 242def main():