-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
58 lines (45 loc) · 1.57 KB
/
install.sh
File metadata and controls
58 lines (45 loc) · 1.57 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FILE=./.installed
if [ -f "$FILE" ]; then
echo "$FILE exists."
echo "> Remove debian kernel"
apt remove linux-image-amd64 'linux-image-6.1*' -y
echo "> Remove os probe"
apt remove os-prober -y
echo "> Install done! You can access your server by https://$(hostname --ip):8006"
echo "> Rebooting server in 10 seconds"
sleep 10
echo "> Rebooting..."
reboot
else
echo "$FILE does not exist."
echo "Host IP: "
read ip
echo "$ip $HOSTNAME" >> /etc/hosts
echo "This should output the above IP:"
echo $(hostname --ip-address)
echo "If not, use ^C to cancel the install..."
echo "> Proceeding in 5 seconds..."
sleep 2
echo "> in 3 seconds"
sleep 1
echo "> in 2 seconds"
sleep 1
echo "> in 1 second"
sleep 1
touch install.log
echo "> Installing packages..."
apt update -y
apt install curl wget sudo htop wget -y
echo "> Adding repo..."
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
echo "> Adding repo key..."
wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
echo "> Installing packages..."
apt update -y
apt full-upgrade -y
echo "> Installing proxmox kernel..."
apt install proxmox-default-kernel -y
apt install proxmox-ve postfix open-iscsi chrony -y
echo "> Now reboot the server and execute this script again"
touch $FILE
fi