From 0ad4135445ed028b43e476f8d7d344763be8f4ca Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 16 Jul 2024 08:21:31 +0000 Subject: [PATCH] Create spool folder if not exists --- bashclub-zsync/usr/bin/bashclub-zsync | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bashclub-zsync/usr/bin/bashclub-zsync b/bashclub-zsync/usr/bin/bashclub-zsync index e5fe57c..e218851 100644 --- a/bashclub-zsync/usr/bin/bashclub-zsync +++ b/bashclub-zsync/usr/bin/bashclub-zsync @@ -332,8 +332,10 @@ if [ $checkzfs_disabled -eq 0 ]; then if [[ $debug == "-v" ]]; then log "[DEBUG] Command:\n$checkzfs $c_key $c_value --output checkmk --threshold $checkzfs_max_age --maxsnapshots $checkzfs_max_snapshot_count --prefix $checkzfs_prefix --filter \"$checkzfs_filter\" >> /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix}"; fi $checkzfs $c_key $c_value --output checkmk --threshold $checkzfs_max_age --maxsnapshots $checkzfs_max_snapshot_count --prefix $checkzfs_prefix --filter "$checkzfs_filter" >> /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix} if [ $checkzfs_spool -eq 0 ] || [ $checkzfs_local -gt 0 ]; then + mkdir -p /var/lib/check_mk_agent/spool/ $mv /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix} /var/lib/check_mk_agent/spool/ else + $ssh $controlmaster $controlpath $controlpersist $sshcipher $zsync_sshport $source "mkdir -p /var/lib/check_mk_agent/spool/" $scp -P ${sshport} /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix} ${source}:/var/lib/check_mk_agent/spool/ fi fi