You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run.sh 940B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. # start in right dir
  3. cd /ircd
  4. # make config file
  5. if [ ! -f "/ircd/ircd.yaml" ]; then
  6. awk '{gsub(/path: languages/,"path: /ircd-bin/languages")}1' /ircd-bin/oragono.yaml > /tmp/ircd.yaml
  7. # change default oper passwd
  8. OPERPASS=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c20)
  9. echo "Oper username:password is dan:$OPERPASS"
  10. ENCRYPTEDPASS=$(echo "$OPERPASS" | /ircd-bin/oragono genpasswd)
  11. ORIGINALPASS='\$2a\$04\$LiytCxaY0lI.guDj2pBN4eLRD5cdM2OLDwqmGAgB6M2OPirbF5Jcu'
  12. awk "{gsub(/password: \\\"$ORIGINALPASS\\\"/,\"password: \\\"$ENCRYPTEDPASS\\\"\")}1" /tmp/ircd.yaml > /tmp/ircd2.yaml
  13. unset OPERPASS
  14. unset ENCRYPTEDPASS
  15. unset ORIGINALPASS
  16. mv /tmp/ircd2.yaml /ircd/ircd.yaml
  17. fi
  18. # make db
  19. if [ ! -f "/ircd/ircd.db" ]; then
  20. /ircd-bin/oragono initdb
  21. fi
  22. # make self-signed certs
  23. if [ ! -f "/ircd/tls.key" ]; then
  24. /ircd-bin/oragono mkcerts
  25. fi
  26. # run!
  27. exec /ircd-bin/oragono run