1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
ipv4_addr=$(ip -4 route get 8.8.8.8 | awk {'print $7'} | tr -d '\n')
echo $ipv4_addr
sed -i "s/127.0.1.1/${ipv4_addr}/g" /etc/hosts
cat /etc/hosts
hostname --ip-address
## Add psb no subscriont list
## Option 1: Offical mirrors
tee /etc/apt/sources.list.d/pbs-no-subscription.list << "EOF"
deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription
EOF
## Option 2: utsc mirros
tee /etc/apt/sources.list.d/pbs-no-subscription.list << "EOF"
deb https://mirrors.ustc.edu.cn/proxmox/debian/pbs bullseye pbs-no-subscription
EOF
apt update
apt -y dist-upgrade
## Install PBS server
apt install proxmox-backup
# Remove enterprise sourcelist
rm -rf /etc/apt/sources.list.d/pbs-enterprise.list
## Disable subscription alert
sed -i.backup -z "s/res === null || res === undefined || \!res || res\n\t\t\t.data.status.toLowerCase() \!== 'active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart proxmox-backup-proxy
|