Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# shellcheck disable=2317
servicename="minecraft"
[ "${0%/*}" = "$0" ] && SRVROOT="." || SRVROOT="${0%/*}"
cd "$SRVROOT" || exit 1
SRVROOT="$PWD"
cd "$SRVROOT" || { printf "Server root directory %s not found." "$SRVROOT" ; exit 1; }