mirror of
https://github.com/bashclub/proxmox-zfs-postinstall.git
synced 2024-12-25 17:50:13 +01:00
Update postinstall
swap: disable auto-snapshot per label, not globally zsync: fix log path virtio-win-updater: rework cronjob
This commit is contained in:
parent
8c59f490f0
commit
8cd25f9342
12
postinstall
12
postinstall
@ -528,9 +528,10 @@ create_swap_pool(){
|
|||||||
log "Configuring swap storage"
|
log "Configuring swap storage"
|
||||||
if ! pvesm status | grep swap > /dev/null; then
|
if ! pvesm status | grep swap > /dev/null; then
|
||||||
if ! zfs list rpool/swap > /dev/null 2>&1 ; then
|
if ! zfs list rpool/swap > /dev/null 2>&1 ; then
|
||||||
zfs create -o com.sun:auto-snapshot=false rpool/swap
|
zfs create -o com.sun:auto-snapshot:frequent=false -o com.sun:auto-snapshot:hourly=false -o com.sun:auto-snapshot:daily=false -o com.sun:auto-snapshot:weekly=false -o com.sun:auto-snapshot:monthly=false rpool/swap
|
||||||
else
|
else
|
||||||
zfs set com.sun:auto-snapshot=false rpool/swap
|
zfs set com.sun:auto-snapshot:frequent=false com.sun:auto-snapshot:hourly=false com.sun:auto-snapshot:daily=false com.sun:auto-snapshot:weekly=false com.sun:auto-snapshot:monthly=false rpool/swap
|
||||||
|
zfs inherit com.sun:auto-snapshot rpool/swap
|
||||||
fi
|
fi
|
||||||
pvesm add zfspool swap --content images,rootdir --pool rpool/swap
|
pvesm add zfspool swap --content images,rootdir --pool rpool/swap
|
||||||
fi
|
fi
|
||||||
@ -580,7 +581,7 @@ install_zsync(){
|
|||||||
create 644 root root
|
create 644 root root
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
mkdir -p /var/log/bashclub-zsync-example
|
mkdir -p /var/log/bashclub-zsync
|
||||||
cat << EOF > /etc/cron.d/bashclub-zsync
|
cat << EOF > /etc/cron.d/bashclub-zsync
|
||||||
#00 23 * * * root /usr/bin/bashclub-zsync -c /etc/bashclub/zsync.conf > /var/log/bashclub-zsync/zsync.log
|
#00 23 * * * root /usr/bin/bashclub-zsync -c /etc/bashclub/zsync.conf > /var/log/bashclub-zsync/zsync.log
|
||||||
EOF
|
EOF
|
||||||
@ -616,7 +617,10 @@ else
|
|||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
chmod +x /usr/local/bin/virtio-win-updater
|
chmod +x /usr/local/bin/virtio-win-updater
|
||||||
ln -sf /usr/local/bin/virtio-win-updater /etc/cron.daily/virtio-win-updater
|
cat << EOF > /etc/cron.daily/virtio-win-updater
|
||||||
|
#!/bin/bash
|
||||||
|
/usr/local/bin/virtio-win-updater >> /var/log/virtio-win-updater.log 2>&1
|
||||||
|
EOF
|
||||||
log "Running virtio-win-updater"
|
log "Running virtio-win-updater"
|
||||||
virtio-win-updater
|
virtio-win-updater
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user