diff --git a/deploy.sh b/deploy.sh index cae4c37..fc72b46 100755 --- a/deploy.sh +++ b/deploy.sh @@ -91,6 +91,7 @@ games="\ supertuxkart \ bzflag \ hedgewars \ +hypersomina \ lix \ mindustry \ minetest \ diff --git a/scripts/deploy_hypersomnia.sh b/scripts/deploy_hypersomnia.sh new file mode 100755 index 0000000..196da69 --- /dev/null +++ b/scripts/deploy_hypersomnia.sh @@ -0,0 +1,75 @@ +#!/bin/bash +# Collection of scripts to deploy a server hosting several open-source games +# Copyright (C) 2022 Jarno van der Kolk +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +set -e + +if [ -e /etc/systemd/system/hypersomnia.service ]; then + systemctl stop hypersomnia +fi + +mkdir -p /opt/hypersomnia +curl --location 'https://hypersomnia.xyz/builds/latest/Hypersomnia.AppImage' > /opt/hypersomnia/Hypersomnia.AppImage +chmod +x /opt/hypersomnia/Hypersomnia.AppImage + +mkdir -p /home/${systemuser}/.config/Hypersomnia.old/user/ +cat > /home/${systemuser}/.config/Hypersomnia.old/user/config.force.lua < /etc/systemd/system/hypersomnia.service <