Skip to content

Instantly share code, notes, and snippets.

@crabdancing
Created October 17, 2020 08:54
Show Gist options
  • Save crabdancing/6d82a624db0659d9da31b7d12ce52a1c to your computer and use it in GitHub Desktop.
Save crabdancing/6d82a624db0659d9da31b7d12ce52a1c to your computer and use it in GitHub Desktop.
little wrapper script I wrote for a dear friend :)
#!/usr/bin/env bash
# Copyleft (C) Alexandria Pettit 2020
# Simple wrapper script to help with launching multiple minecraft servers
if [ $# -eq 0 ]; then
echo "Arg missing! usage: minecraft.sh [instance]"
exit 1
fi
target="/srv/minecraft/$1"
if [ ! -d "$target" ]; then
echo "Instance specified does not exist at expected path (/srv/minecraft)."
exit 2
fi
cd "$target"
firejail --caps.drop=all java -Xmx4096M -Xms4096M -jar fabric-server-launch.jar nogui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment