#!/bin/sh

# Script to generate database passwords. Passwords will be written to stdout,
# you can redirect stdout to etc/dbpasswords.secret

# Exit on any error:
set -e

echo "# Format: 'dummy:<db_host>:<db_name>:<user>:<password>'"

printf "dummy:localhost:domjudge:domjudge:"
	head -c12 /dev/urandom | base64 | head -c16 | tr '/+' 'Aa'
echo
