Skip to content

Instantly share code, notes, and snippets.

View symm's full-sized avatar
🦄

Gareth Jones symm

🦄
View GitHub Profile
for x in ./*.chd; do
mkdir "${x%.*}"
mv "$x" "${x%.*}"
done
@symm
symm / proxmox-mikrotik-template.sh
Last active May 27, 2024 09:02
Installing Mikrotik RouterOS on Proxmox VE easily
#!/bin/bash
# Adapted from https://www.apalrd.net/posts/2023/tip_routeros/
set -e
# https://mikrotik.com/download
VERSION="7.14.3"
VM_ID="940"
wget --no-clobber "https://download.mikrotik.com/routeros/$VERSION/chr-$VERSION.img.zip"
#!/bin/bash
if [ ! -f /root/slic_table ]; then
cat /sys/firmware/acpi/tables/SLIC > /root/slic_table
echo "Wrote SLIC to /root/slic_table"
fi
UUID=$(dmidecode | grep -A8 'System Information' | grep -i UUID | awk '{print $2}')
SERIAL=$(dmidecode | grep -A8 'System Information' | grep -i 'serial number' | awk '{print$3}')
PRODUCT=$(dmidecode | grep -A8 'System Information' | grep -i "Product Name" | sed "s/^.*Product Name: //")