csgo-start-script/csgo-start
2021-01-07 18:05:45 +01:00

45 lines
1.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# ×==========================================×
# | based on bukkit-start by Elias Schriefer |
# ×==========================================×
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 $?