added server

This commit is contained in:
Adolfo Delorenzo 2023-12-20 10:51:11 -06:00
parent 6301f19cbc
commit 4251cf5034

View File

@ -8,7 +8,6 @@ lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default ubuntu:22.04 $random-csgo2-00 --network vn-$random > /dev/null
# Generate docker compose file # Generate docker compose file
echo $random > /tmp/random echo $random > /tmp/random
@ -19,3 +18,19 @@ random_rev=`curl --silent -X GET https://adelorenzo:dimi2014@couchdb.oe74.cloud/
curl --silent -H "Content-Type: text/x-yaml" -X PUT --data-binary @${random}-wg_server.yaml --user "adelorenzo:dimi2014" "https://couchdb.oe74.cloud/kk_users/${random}/${random}-wg_server.yaml?rev=$random_rev" > /dev/null curl --silent -H "Content-Type: text/x-yaml" -X PUT --data-binary @${random}-wg_server.yaml --user "adelorenzo:dimi2014" "https://couchdb.oe74.cloud/kk_users/${random}/${random}-wg_server.yaml?rev=$random_rev" > /dev/null
rm ${random}-wg_server.yaml rm ${random}-wg_server.yaml
# Deploy the game server
# CSGO2 server
csgo2() { lxc launch --project $random -p default ubuntu:22.04 $random-csgo2 --network vn-$random > /dev/null; }
# Minecraft server
minecraft() { lxc launch --project $random -p default ubuntu:22.04 $random-minecraft --network vn-$random > /dev/null; }
# Apex server
apex() { lxc launch --project $random -p default ubuntu:22.04 $random-apex --network vn-$random > /dev/null; }
# Rust server
rust() { lxc launch --project $random -p default ubuntu:22.04 $random-rust --network vn-$random > /dev/null; }
# GTA server
gta() { lxc launch --project $random -p default ubuntu:22.04 $random-gta --network vn-$random > /dev/null; }