Skip to content

Instantly share code, notes, and snippets.

@willjasen
Last active October 28, 2024 21:40
Show Gist options
  • Save willjasen/5606fcaa4bf859fbe4e29c4760c6166b to your computer and use it in GitHub Desktop.
Save willjasen/5606fcaa4bf859fbe4e29c4760c6166b to your computer and use it in GitHub Desktop.
#!/bin/sh
###
### Current image script version -- v1.1
###
### IMAGE HISTORY
# - v1.0 -- base install of Ubuntu 24 Server with / as btrfs and no swap partition, no commands or scripts have been applied
# - v1.1 -- installed needed apps and updates; make GRUB boot screen only 3 seconds
###
# Update the operating system
apt update; DEBIAN_FRONTEND=noninteractive apt upgrade -y;
# Install common tools
apt install curl git wget net-tools screen jq locate nano iputils-ping -y;
# Install management tools
apt install ssh openssl qemu-guest-agent -y;
# Ensure QEMU guest agent is started and enabled
systemctl start qemu-guest-agent;
systemctl enable qemu-guest-agent;
# Install Tailscale (but don't activate)
curl -fsSL https://tailscale.com/install.sh | sh;
# Install Zabbix Agent 2
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu24.04_all.deb;
dpkg -i zabbix-release_7.0-2+ubuntu24.04_all.deb;
apt update;
apt install zabbix-agent2 zabbix-agent2-plugin-* -y;
systemctl restart zabbix-agent2;
systemctl enable zabbix-agent2;
# Make the GRUB boot screen only show up for 3 seconds
sed -i '/^GRUB_RECORDFAIL_TIMEOUT=/ s/.*/GRUB_RECORDFAIL_TIMEOUT=3/; t; $ a GRUB_RECORDFAIL_TIMEOUT=3' /etc/default/grub;
update-grub;
# Clean up no longer needed dependencies
apt autoremove -y;
# End of the script
echo "The script is finished."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment