2025-01-22 18:10:19

This commit is contained in:
henk
2025-01-22 18:10:19 +01:00
parent e4401e4a94
commit f046229313
+1 -12
View File
@@ -1,16 +1,5 @@
#!/bin/bash #!/bin/bash
# This modifyr´s the datacenter.cfg
# set the upper limit to upper=70000000
# mkdir -p /root/backup
cp /etc/pve/datacenter.cfg /root/backup/ cp /etc/pve/datacenter.cfg /root/backup/
/usr/bin/sed -ri "s/lower=[12][0-9]{3}[01][0-9][0-3][0-9]/lower=$(date '+%y%m%d'01)/g" /etc/pve/datacenter.cfg
/usr/bin/sed -i "s/lower=".*"/lower=$(/usr/bin/date '+%y%m%d'01),upper=900000000/g" /etc/pve/datacenter.cfg
# thas adds the date + 01
# example 25010201 is the next id for the ct or vm
# set this in the crontab
# 01 00 * * * /root/next-id.sh