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 812B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # make config file
  3. if [ ! -f "/ircd/ircd.yaml" ]; then
  4. awk '{gsub(/path: languages/,"path: /ircd-bin/languages")}1' /ircd-bin/default.yaml > /tmp/ircd.yaml
  5. # change default oper passwd
  6. OPERPASS=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c20)
  7. echo "Oper username:password is admin:$OPERPASS"
  8. ENCRYPTEDPASS=$(echo "$OPERPASS" | /ircd-bin/ergo genpasswd)
  9. ORIGINALPASS='\$2a\$04\$0123456789abcdef0123456789abcdef0123456789abcdef01234'
  10. awk "{gsub(/password: \\\"$ORIGINALPASS\\\"/,\"password: \\\"$ENCRYPTEDPASS\\\"\")}1" /tmp/ircd.yaml > /tmp/ircd2.yaml
  11. unset OPERPASS
  12. unset ENCRYPTEDPASS
  13. unset ORIGINALPASS
  14. mv /tmp/ircd2.yaml /ircd/ircd.yaml
  15. fi
  16. # make self-signed certs if they don't already exist
  17. /ircd-bin/ergo mkcerts
  18. # run!
  19. exec /ircd-bin/ergo run