#!/bin/sh case "$1" in gmysql) dbtype=MySQL ;; gpgsql) dbtype=PostgreSQL ;; *) echo "usage: $0 [ gmysql | gpgsql ]" exit 1 ;; esac while [ ".$db" = . ]; do echo "Please enter the name of the database to be created:" read db done while [ ".$root" = . ]; do echo "Please enter the name of the database administrator account:" read root done while [ ".$pdnsadm" = . ]; do echo "Please enter the name of the DNS administrator account:" read pdnsadm done while [ ".$pdns" = . ]; do echo "Please enter the name of the DNS user account:" read pdns done echo "" echo "The $dbtype database '$db' will be created by '$root'." echo "Access is granted to the DNS administrator '$pdnsadm'" echo "and the DNS user '$pdns'." echo "" case "$1" in gmysql) echo "Please log in as the $dbtype database administrator ($root)" mysql -u$root -p mysql <