cleanup code with variables for better access

This commit is contained in:
2022-01-02 18:51:34 +01:00
parent 71b1cc7924
commit 266d5b0bf0
3 changed files with 15 additions and 9 deletions

View File

@@ -4,6 +4,8 @@
# | bukkit-console by Elias Schriefer |
# ×===================================×
server=""
if [ "$1" = "-h" ]
then
echo "bukkit-console [option]"
@@ -18,27 +20,27 @@ fi
# Get the bukkit server status: is it running or stopped?
# We don't need echo, but thx anyways...
bukkit-status > /dev/null
$server-status > /dev/null
if [ $? -gt 0 ]
then
# If the server is stopped, fukcing start it, man!
bukkit-start
$server-start
fi
if [ "$1" = "-f" ]
then
# Gimme the console
sudo screen -xr bukkit
sudo screen -xr $server
# Now gimme my suxesvul eksid koud...
true
elif [ "$1" = "-ff" ]
then
# Hand me the console over
sudo screen -dr bukkit
sudo screen -dr $server
# Now gimme my suxesvul eksid koud...
true
else
# Gimme the console, plz...
sudo screen -rq bukkit
sudo screen -rq $server
if [ $? -gt 0 ]
then
# If the console is attached elsewhere, say it