servers added

This commit is contained in:
Adolfo Delorenzo 2023-12-20 13:41:21 -06:00
parent 7137481324
commit 04afe129b0

View File

@ -1,29 +1,92 @@
#!/bin/bash #!/bin/bash
random=`date | md5sum | awk '{print $1}' | cut -c 22-` random=`date | md5sum | awk '{print $1}' | cut -c 22-`
# echo $random echo $random
# CSGO2 server # CSGO2 servers
csgo2() { lxc launch --project $random -p default ubuntu:22.04 $random-csgo2 --network vn-$random > /dev/null; } csgo2-std() {
# Minecraft server
minecraft() {
echo "Minecraft function"
lxc project create $random -c features.images=false > /dev/null 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 minecraft-server $random-minecraft --network vn-$random lxc launch --project $random -p default csgo2-server $random-csgo2-std --network vn-$random --config limits.cpu=2 --config limits.memory=2048MiB > /dev/null
} }
# Apex server csgo2-max() {
apex() { lxc launch --project $random -p default ubuntu:22.04 $random-apex --network vn-$random > /dev/null; } lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default csgo2-server $random-csgo2-max --network vn-$random --config limits.cpu=4 --config limits.memory=4096MiB > /dev/null
}
# Rust server # Minecraft servers
rust() { lxc launch --project $random -p default ubuntu:22.04 $random-rust --network vn-$random > /dev/null; } minecraft-std() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default minecraft-server $random-minecraft-std --network vn-$random --config limits.cpu=2 --config limits.memory=2048MiB > /dev/null
}
minecraft-max() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default minecraft-server $random-minecraft-max --network vn-$random --config limits.cpu=4 --config limits.memory=4096MiB > /dev/null
}
# Apex servers
apex-std() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default apex-server $random-apex-std --network vn-$random --config limits.cpu=2 --config limits.memory=2048MiB > /dev/null
}
apex-max() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default apex-server $random-apex-max --network vn-$random --config limits.cpu=4 --config limits.memory=4096MiB > /dev/null
}
# Rust servers
rust-std() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default rust-server $random-rust-std --network vn-$random --config limits.cpu=2 --config limits.memory=2048MiB > /dev/null
}
rust-max() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default rust-server $random-rust-max --network vn-$random --config limits.cpu=4 --config limits.memory=4096MiB > /dev/null
}
# GTA server # GTA server
gta() { lxc launch --project $random -p default ubuntu:22.04 $random-gta --network vn-$random > /dev/null; } gta-std() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default gta-server $random-gta-std --network vn-$random --config limits.cpu=2 --config limits.memory=2048MiB > /dev/null
}
gta-max() {
lxc project create $random -c features.images=false > /dev/null
lxc project switch $random > /dev/null
lxc --project $random network create vn-$random > /dev/null
cat /root/default.profile | lxc --project $random profile edit default > /dev/null
lxc launch --project $random -p default gta-server $random-gta-max --network vn-$random --config limits.cpu=4 --config limits.memory=4096MiB > /dev/null
}
# Generate docker compose file # Generate docker compose file
echo $random > /tmp/random echo $random > /tmp/random