2020-12-29 12:21:46 +01:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
2021-01-07 18:05:45 +01:00
|
|
|
|
# ×==========================================×
|
|
|
|
|
# | based on bukkit-start by Elias Schriefer |
|
|
|
|
|
# ×==========================================×
|
2020-12-29 12:21:46 +01:00
|
|
|
|
|
|
|
|
|
if [ "$1" = "-h" ]
|
|
|
|
|
then
|
|
|
|
|
echo "bukkit-start [option]"
|
|
|
|
|
echo
|
|
|
|
|
echo "Options:"
|
|
|
|
|
echo " -h Show help"
|
|
|
|
|
echo " -D starts Death Mach"
|
|
|
|
|
echo " -d starts Demolition"
|
|
|
|
|
echo "-C starts Classic Casual"
|
|
|
|
|
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
|
|
|
|
|
cd /home/steam/
|
|
|
|
|
sudo -u steam ./steamcmd.sh +login anonymous +force_install_dir /media/games/steamgames +app_update 740 +quit
|
|
|
|
|
cd /media/games/steamgames
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
|
|
|
|
|
|
-D) sudo -u steam screen -dmS csgo ./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 2 +mapgroup mg_allclassic +map de_dust
|
|
|
|
|
true
|
|
|
|
|
;;
|
|
|
|
|
-d) sudo -u steam screen -dmS csgo ./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition +map de_lake
|
|
|
|
|
true
|
|
|
|
|
;;
|
|
|
|
|
-C) sudo -u steam screen -dmS csgo ./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2
|
|
|
|
|
esac
|
|
|
|
|
else
|
|
|
|
|
# or my unsuxesvul eksit koud...
|
|
|
|
|
false
|
|
|
|
|
fi
|
|
|
|
|
# and eksit wif that eksit koud
|
|
|
|
|
exit $?
|