#!/bin/bash # ×===================================× # | bukkit-console by Elias Schriefer | # ×===================================× if [ "$1" = "-h" ] then echo "bukkit-console [option]" echo echo "Options:" echo "Option for start of csgo server" csgo-start -h echo echo echo "Option for console connection" echo " -h Show help" echo " -f Get screen even if it is" echo " already attached" echo " -ff Same as -f but detach it first" exit 0 fi # Get the bukkit server status: is it running or stopped? # We don't need echo, but thx anyways... csgo-status > /dev/null if [ $? -gt 0 ] then # If the server is stopped, fukcing start it, man! csgo-start "$1" fi if [ "$2" = "-f" ] then # Gimme the console sudo -u steam screen -xr csgo # Now gimme my suxesvul eksid koud... true elif [ "$2" = "-ff" ] then # Hand me the console over sudo -u steam screen -dr csgo # Now gimme my suxesvul eksid koud... true else # Gimme the console, plz... sudo -u steam screen -rq csgo if [ $? -gt 0 ] then # If the console is attached elsewhere, say it echo Console is already in use # Now gimme my suxesvul eksit koud... false else # or my unsuxesvul eksid koud... true fi fi # and eksid wif that eksid koud exit $?