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-start by Elias Schriefer |
# ×=================================×
server=""
if [ "$1" = "-h" ]
then
echo "bukkit-start [option]"
@@ -15,14 +17,14 @@ 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, go into the server directory, ...
cd /media/games/bukkit/
cd /media/games/$server/
# start the screen with Socket name & title "bukkit"
# and run the start script
sudo screen -dmS bukkit -t bukkit ./Start.sh
sudo screen -dmS $server -t $server ./start.sh
# Now gimme my suxesvul eksit koud...
true
else