#!/bin/bash
servers="server1;server2;server3"
IFS=';' read -r -a array <<< "$servers"
rand=$[ $RANDOM % ${#array[@]} ]
echo ${array[$rand]}
-
https://links.infomee.fr/?wfMNvwTo run this inside a container, you have to docker run --privileged
You can run this on host, then map /dev/random from host inside container
/!\ In test environment ONLY :
Don't install anything, just map /dev/urandom from host into /dev/random container
docker run -v /dev/urandom:/dev/random
Test entropy : (rng-tools)
cat /dev/random | rngtest -c 1000
-
https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-havegedsleep $(shuf -i 1-600 -n 1) && /bin/gogo
-
https://links.infomee.fr/?oO0cBAAlgo pour faire du random avec poids
-
http://www.javascriptkit.com/javatutors/weighrandom2.shtml