Skip to content

Instantly share code, notes, and snippets.

@Taurolyon
Taurolyon / proxmox_rooter.sh
Last active February 3, 2024 07:46
bash script to find and download the latest version of ROOTer (an OpenWRT derivative), and install it as a UEFI Proxmox VM.
#!/bin/bash
# by Jay M -- @Taurolyon
# Ref download: http://www.aturnofthenut.com/builds/GoldenOrb/x86-64-GO2023-09-01.zip
# inspired by https://computingforgeeks.com/install-and-configure-openwrt-vm-on-proxmox-ve/
set -o errexit
set -o nounset
set -o pipefail
log() {
#!/bin/sh
# inspired by https://computingforgeeks.com/install-and-configure-openwrt-vm-on-proxmox-ve/
VM_NAME=OpenWrt
VM_ID=$(pvesh get /cluster/nextid)
RAM=2048
CORES=1
BRIDGE=vmbr1
IMAGE=./openwrt.img
STORAGE=local
VER=$(curl --silent "https://api.github.com/repos/openwrt/openwrt/releases/latest" | grep '"tag_name"' | sed -E 's/.*"v([^"]+)".*/\1/')
@Taurolyon
Taurolyon / prox_openwrt.sh
Last active February 2, 2024 01:45
Proxmox OpenWRT script
#!/bin/sh
# inspired by https://computingforgeeks.com/install-and-configure-openwrt-vm-on-proxmox-ve/
VM_NAME=OpenWrt
VM_ID=$(pvesh get /cluster/nextid)
RAM=2048
CORES=1
BRIDGE=vmbr1
IMAGE=./openwrt.img
STORAGE=local
VER=$(curl --silent "https://api.github.com/repos/openwrt/openwrt/releases/latest" | grep '"tag_name"' | sed -E 's/.*"v([^"]+)".*/\1/')
#!/bin/sh
# Initiliaze and create a current_ver.txt file and backups directory if it does not exist
if [ ! -f current_ver.txt ]
then
echo 0 > current_ver.txt
fi
if [ ! -d backups ]
then
mkdir backups
@Taurolyon
Taurolyon / minecraft.service
Created November 21, 2023 12:05
systemd daemon service file for minecraft dedicated server
[Unit]
Description=Minecraft dedicated server
Wants=network-online.target
After=syslog.target network.target nss-lookup.target network-online.target
[Service]
ExecStartPre=/home/minecraft/mcserver/update_server.sh
ExecStart=/home/minecraft/mcserver/launch.sh
User=minecraft
Group=minecraft
@Taurolyon
Taurolyon / satisfactory.service
Created November 21, 2023 03:33
systemd daemon service for Satisfactory
[Unit]
Description=Satisfactory dedicated server
Wants=network-online.target
After=syslog.target network.target nss-lookup.target network-online.target
[Service]
Environment="LD_LIBRARY_PATH=./linux64"
ExecStartPre=/usr/games/steamcmd '+force_install_dir' '/home/steam/SatisfactoryDedicatedServer' '+login' 'anonymous' '+app_update' '1690800' 'validate' '+quit'
ExecStart=/home/steam/SatisfactoryDedicatedServer/FactoryServer.sh '-ServerQueryPort=15777' '-BeaconPort=15000' '-Port=7777' '-log' '-unattended' '-multihome=0.0.0.0' '-DisablePacketRouting'
User=steam
@Taurolyon
Taurolyon / lvm-mount.sh
Last active January 17, 2023 12:21
Rescue mode LVM mount script
#!/bin/sh
volume=$(lvm vgscan | grep -oP '"\K[^"\047]+(?=["\047])')
vgchange -a y $volume
mount /dev/$volume/root /mnt
@Taurolyon
Taurolyon / satisfactory.service
Last active December 11, 2022 05:06 — forked from vsbabu/springbootapp.service
Skeleton service file for SystemD (/etc/systemd/system/filename.service)
[Unit]
Description=Satisfactory Dedicated Server
After=syslog.target
[Service]
User=steam
Group=steam
#Environment='STDOUT=/dev/null'
Environment='STDOUT=/home/steam/SatisfactoryDedicatedServer/server.log'
#!/bin/bash
pac-init () {
pacman-key --init
pacman-key --populate archlinux
pacman-key --refresh-keys
mirrorlist-update
}
mirrorlist-update () {
[02:04:35] [main/ERROR]: Unknown biome, defaulting to plains
[02:04:36] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
[02:04:37] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[02:04:37] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[02:04:37] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[02:04:37] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[02:04:37] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[02:04:37] [main/INFO]: Reload