2020-12-29 12:17:11 +01:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# ×==================================×
|
|
|
|
|
# | bukkit-status by Elias Schriefer |
|
|
|
|
|
# ×==================================×
|
|
|
|
|
|
2022-01-02 18:51:34 +01:00
|
|
|
|
server=""
|
|
|
|
|
|
2020-12-29 12:17:11 +01:00
|
|
|
|
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...
|
2022-01-02 18:51:34 +01:00
|
|
|
|
sudo screen -ls $server > /dev/null
|
2020-12-29 12:17:11 +01:00
|
|
|
|
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 $?
|