Added PostUpgrade tasks for Debian 13 and Alpine 3.23, refactored Type Detection of scripts tageting one system

This commit is contained in:
2026-01-11 01:16:33 +01:00
parent fd4bd0081a
commit d51a694daa
7 changed files with 123 additions and 30 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/bash
ID=100
#ID=$1
VMS=$(qm list | tail -n+2 | awk '{print $1}')
CTS=$(pct list | tail -n+2 | awk '{print $1}')
#Determine id type
if [[ $VMS =~ $ID ]]; then TYPE=VM; fi
if [[ $CTS =~ $ID ]]; then TYPE=CT; fi
if [ -z ${TYPE+x} ]; then TYPE=Unset; fi
echo ID: $ID is $TYPE