initial commit (uploading from fujitsu-server)
This commit is contained in:
commit
e5853fab5a
54
bukkit-console
Executable file
54
bukkit-console
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ×===================================×
|
||||
# | bukkit-console by Elias Schriefer |
|
||||
# ×===================================×
|
||||
|
||||
if [ "$1" = "-h" ]
|
||||
then
|
||||
echo "bukkit-console [option]"
|
||||
echo
|
||||
echo "Options:"
|
||||
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...
|
||||
bukkit-status > /dev/null
|
||||
if [ $? -gt 0 ]
|
||||
then
|
||||
# If the server is stopped, fukcing start it, man!
|
||||
bukkit-start
|
||||
fi
|
||||
if [ "$1" = "-f" ]
|
||||
then
|
||||
# Gimme the console
|
||||
sudo screen -xr bukkit
|
||||
# Now gimme my suxesvul eksid koud...
|
||||
true
|
||||
elif [ "$1" = "-ff" ]
|
||||
then
|
||||
# Hand me the console over
|
||||
sudo screen -dr bukkit
|
||||
# Now gimme my suxesvul eksid koud...
|
||||
true
|
||||
else
|
||||
# Gimme the console, plz...
|
||||
sudo screen -rq bukkit
|
||||
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 $?
|
33
bukkit-start
Executable file
33
bukkit-start
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ×=================================×
|
||||
# | bukkit-start by Elias Schriefer |
|
||||
# ×=================================×
|
||||
|
||||
if [ "$1" = "-h" ]
|
||||
then
|
||||
echo "bukkit-start [option]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -h Show help"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Get the bukkit server status: is it running or stopped?
|
||||
# We don't need echo, but thx anyways...
|
||||
bukkit-status > /dev/null
|
||||
if [ $? -gt 0 ]
|
||||
then
|
||||
# If the server is stopped, go into the server directory, ...
|
||||
cd /media/games/bukkit/
|
||||
# start the screen with Socket name & title "bukkit"
|
||||
# and run the start script
|
||||
sudo screen -dmS bukkit -t bukkit ./Start.sh
|
||||
# Now gimme my suxesvul eksit koud...
|
||||
true
|
||||
else
|
||||
# or my unsuxesvul eksit koud...
|
||||
false
|
||||
fi
|
||||
# and eksit wif that eksit koud
|
||||
exit $?
|
34
bukkit-status
Executable file
34
bukkit-status
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ×==================================×
|
||||
# | bukkit-status by Elias Schriefer |
|
||||
# ×==================================×
|
||||
|
||||
if [ "$1" = "-h" ]
|
||||
then
|
||||
echo "bukkit-status [option]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -h Show help"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Is there a window with name "bukkit" already running in screen?
|
||||
# We don't need your fukcing text, ew...
|
||||
sudo screen -ls bukkit > /dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# If the screen window is indeed running, shout it in my
|
||||
# face, I wanna know...
|
||||
echo running
|
||||
# Now gimme my suxesvul eksit koud...
|
||||
true
|
||||
else
|
||||
# If the screen window is not running, shout that in my
|
||||
# face, too, I wanna know...
|
||||
echo stopped
|
||||
# Gimme my unsuxesvul eksid koud...
|
||||
false
|
||||
fi
|
||||
# and eksit wif that eksid koud
|
||||
exit $?
|
Loading…
Reference in New Issue
Block a user