unrealircd- supernets unrealircd source & configuration |
git clone git://git.acid.vegas/unrealircd.git |
Log | Files | Refs | Archive |
setup.sh (1271B)
1 #!/bin/bash 2 # SuperNETS UnrealIRCd - Developed by acidvegas (https://github.com/supernets/unrealircd) 3 # unrealircd/setup.sh 4 5 set -xev 6 7 # Load environment variables 8 if [ -f .env ]; then 9 source .env 10 else 11 echo "Error: .env file not found" && exit 1 12 fi 13 14 # Copy database files from container to assets directory if they exist 15 if docker exec ircd sh -c "ls /opt/ircd/data/*.db 2>/dev/null"; then 16 docker cp ircd:/opt/ircd/data/*.db assets/ 17 fi 18 19 # Check if all of the assets exist 20 [ ! -d assets ] && echo "error: assets directory not found" && exit 1 21 [ ! -f assets/tls.crt ] && echo "error: tls.crt file not found" && exit 1 22 [ ! -f assets/tls.key ] && echo "error: tls.key file not found" && exit 1 23 [ -z $(ls assets/*.db) ] && echo "warning: no database files found" 24 25 # Remove existing container if it exists 26 docker rm -f ircd 2>/dev/null || true 27 28 # Cleanup docker volumes 29 docker system prune -af --volumes 30 31 # Build the Docker image 32 docker build -t ircd . 33 34 # Run the Docker container with proper settings and environment variables 35 docker run -d \ 36 --name ircd \ 37 --restart always \ 38 --hostname $HOSTNAME \ 39 -p 6660-6669:6660-6669 \ 40 -p 6697:6697 \ 41 -p 7000:7000 \ 42 -p 9000:9000 \ 43 -p ${LEAF_PORT}:${LEAF_PORT} \ 44 ircd