dotfiles/bin/launch-minecraft-server

10 lines
208 B
Bash
Executable file

#!/bin/sh -e
cd /srv/minecraft/bin
if [ -f "$1" ]; then
sudo -u minecraft screen -d -m -S "Serveur Minecraft : ${1}" \
"./${1}"
else
>&2 echo "Le serveur \"${1}\" n'existe pas."
false
fi