Last active
July 9, 2020 10:46
-
-
Save iqbalmineraltown/c56f6f9484a7f46aaa649de3ec705aea to your computer and use it in GitHub Desktop.
Risk of Rain 2 doctl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DO_DROPLET_NAME=ror2-node | |
DO_SIZE=s-2vcpu-2gb | |
DO_REGION=sgp1 | |
DO_SSH_ID=ssh_id_here #$(doctl compute ssh-key list --no-header --format ID) | |
DO_TAGS=game | |
MAIL_NOTIF=example@sample.com | |
GAME_PASSWORD=password_here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source config.sh | |
doctl compute droplet create $DO_DROPLET_NAME --size $DO_SIZE --image docker-18-04 --region $DO_REGION --ssh-keys $DO_SSH_ID --tag-names $DO_TAGS --wait | |
export DO_DROPLET_IP=`doctl compute droplet list | grep $DO_DROPLET_NAME | cut -d$' ' -f9` | |
curl "curlmail.co/$MAIL_NOTIF?subject=cl_password\"$GAME_PASSWORD\";connect\"$DO_DROPLET_IP:25000\";" | |
ssh -o "StrictHostKeyChecking=no" root@$DO_DROPLET_IP "docker run avivace/ror2server:0.1 -p 25000:27015/udp -e R2_PSW='$GAME_PASSWORD'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source config.sh | |
doctl compute droplet delete -f $DO_DROPLET_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Start server:
doctl
on your machineDO_SSH_ID
,DO_SSH_ID
, andGAME_PASSWORD
./create.sh
Delete server:
./destroy.sh