forked from extern/zsync
Create spool folder if not exists
This commit is contained in:
parent
5573f25461
commit
0ad4135445
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user