Allow individual game installs to fail but keep installing the rest
This commit is contained in:
parent
633d68c517
commit
909110b4cb
76
deploy.sh
76
deploy.sh
|
@ -90,25 +90,32 @@ cp console2web/console2web.py /usr/bin/console2web
|
||||||
"$(dirname "$0")"/scripts/deploy_webserver.sh
|
"$(dirname "$0")"/scripts/deploy_webserver.sh
|
||||||
|
|
||||||
# Deploy the game servers
|
# Deploy the game servers
|
||||||
"$(dirname "$0")"/scripts/deploy_supertuxkart.sh
|
games="\
|
||||||
"$(dirname "$0")"/scripts/deploy_bzflag.sh
|
supertuxkart \
|
||||||
"$(dirname "$0")"/scripts/deploy_hedgewars.sh
|
bzflag \
|
||||||
"$(dirname "$0")"/scripts/deploy_lix.sh
|
hedgewars \
|
||||||
"$(dirname "$0")"/scripts/deploy_mindustry.sh
|
lix \
|
||||||
"$(dirname "$0")"/scripts/deploy_minetest.sh
|
mindustry \
|
||||||
"$(dirname "$0")"/scripts/deploy_odamex.sh
|
minetest \
|
||||||
"$(dirname "$0")"/scripts/deploy_openhv.sh
|
odamex \
|
||||||
"$(dirname "$0")"/scripts/deploy_openspades.sh
|
openhv \
|
||||||
"$(dirname "$0")"/scripts/deploy_teeworlds.sh
|
openspades \
|
||||||
"$(dirname "$0")"/scripts/deploy_teeworlds-ddrace.sh
|
teeworlds \
|
||||||
"$(dirname "$0")"/scripts/deploy_unvanquished.sh
|
teeworlds-ddrace \
|
||||||
"$(dirname "$0")"/scripts/deploy_xonotic.sh
|
unvanquished \
|
||||||
"$(dirname "$0")"/scripts/deploy_xonotic-br.sh
|
xonotic \
|
||||||
"$(dirname "$0")"/scripts/deploy_armagetron_advanced.sh
|
xonotic-br \
|
||||||
"$(dirname "$0")"/scripts/deploy_opensoldat.sh
|
armagetron_advanced \
|
||||||
"$(dirname "$0")"/scripts/deploy_supertuxparty.sh
|
opensoldat \
|
||||||
"$(dirname "$0")"/scripts/deploy_ufoai.sh
|
supertuxparty \
|
||||||
"$(dirname "$0")"/scripts/deploy_shatteredparadise.sh
|
ufoai \
|
||||||
|
shatteredparadise"
|
||||||
|
failed_games=""
|
||||||
|
for game in $games; do
|
||||||
|
if ! "$(dirname "$0")"/scripts/deploy_${game}.sh; then
|
||||||
|
failed_games+="${game}\n"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Apply all pending firewall rules. NGINX shouldn't have to be restarted, but it seems to help.
|
# Apply all pending firewall rules. NGINX shouldn't have to be restarted, but it seems to help.
|
||||||
firewall-cmd --reload
|
firewall-cmd --reload
|
||||||
|
@ -116,3 +123,34 @@ systemctl restart nginx
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Installation complete. Password is ${systempassword}"
|
echo "Installation complete. Password is ${systempassword}"
|
||||||
|
if [ -n "$failed_games" ]; then
|
||||||
|
echo "The following games failed to install:"
|
||||||
|
echo -e "$failed_games"
|
||||||
|
echo
|
||||||
|
echo "Use /usr/local/bin/redeploy.sh [game] to try again"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat > /usr/local/bin/redeploy.sh <<EOF
|
||||||
|
#!/bin/bash
|
||||||
|
export stk_version="latest"
|
||||||
|
export bzflag_version="2.4"
|
||||||
|
export mindustry_version="latest"
|
||||||
|
export odamex_version="latest"
|
||||||
|
export openhv_version="latest"
|
||||||
|
export teeworlds_version="latest"
|
||||||
|
export teeworldsddrace_version="16.1"
|
||||||
|
export unvanquished_version="latest"
|
||||||
|
export xonotic_version="0.8.5"
|
||||||
|
export lix_version="latest"
|
||||||
|
export shatteredparadise_version="latest"
|
||||||
|
|
||||||
|
export systemuser="onfoss"
|
||||||
|
export letsencryptemail="jarno@jarno.ca"
|
||||||
|
export DOMAINNAME="$DOMAINNAME"
|
||||||
|
export HOSTEDBYNAME="$HOSTEDBYNAME"
|
||||||
|
export systempassword="$systempassword"
|
||||||
|
export systemuserhome="$systemuserhome"
|
||||||
|
|
||||||
|
"$(dirname "$(realpath -s "$0")")"/scripts/deploy_\${1}.sh
|
||||||
|
EOF
|
||||||
|
chmod +x /usr/local/bin/redeploy.sh
|
||||||
|
|
Reference in New Issue