From 0f98546add0f01a1d7d15b321d6e66424b3ca30f Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 29 Apr 2024 22:12:49 +0200 Subject: [PATCH] syncoid: fix output (#48) Reviewed-on: https://git.mgrote.net/mg/homeserver/pulls/48 Co-authored-by: Michael Grote Co-committed-by: Michael Grote --- roles/mgrote_zfs_sanoid/templates/syncoid.service.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/mgrote_zfs_sanoid/templates/syncoid.service.j2 b/roles/mgrote_zfs_sanoid/templates/syncoid.service.j2 index eda86d2a..69e318b5 100644 --- a/roles/mgrote_zfs_sanoid/templates/syncoid.service.j2 +++ b/roles/mgrote_zfs_sanoid/templates/syncoid.service.j2 @@ -9,6 +9,8 @@ OnSuccess=syncoid_mail.service Type=oneshot # check if dest-dataset is mounted (sed: entferne 1. Zeile; awk: zeige nur yes/no; grep: RC1 when != yes) {% for item in sanoid_syncoid_datasets_sync %} +# print dataset +ExecStart=/bin/sh -c 'echo "{{ item.source_dataset }}"' # check if target dataset is mounted ExecStart=/bin/sh -c '/usr/sbin/zfs get mounted {{ item.destination_mount_check }} | sed 1d | awk "{print $3}" | grep yes > /dev/null' # check if source host is reachable