@@ -, +, @@ --request-db instead of --create-db --- debian/scripts/koha-create | 15 +++++++++++++++ debian/scripts/koha-remove | 37 ++++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 13 deletions(-) --- a/debian/scripts/koha-create +++ a/debian/scripts/koha-create @@ -575,6 +575,9 @@ then zebrapwd="$(pwgen -s 16 1)" # Future enhancement: make this configurable for when your db is on # another server. + touch "/etc/koha/sites/$name/createoptions" + chown "$username:$username" "/etc/koha/sites/$name/createoptions" + mysql_hostname="localhost" # Set up MySQL database for this instance. if [ "$op" = create ] @@ -641,6 +644,11 @@ database user: $mysqluser Thank you. eof + cat > "/etc/koha/sites/$name/createoptions" << eof +# do not edit this file, it is for record keeping purposes only +REQUEST_DB=1 +eof + echo "See $name-db-request.txt for database creation request." echo "Please forward it to the right person, and then run" echo "$0 --populate-db $name" @@ -678,6 +686,13 @@ UPDATE borrowers SET password = '$staffdigest' WHERE borrowernumber = $ADMINUSER; eof + + cat > "/etc/koha/sites/$name/createoptions" << eof +# do not edit this file, it is for record keeping purposes only +REQUEST_DB=0 +eof + + #` echo "staff user password is '$staffpass' but keep that secret" --- a/debian/scripts/koha-remove +++ a/debian/scripts/koha-remove @@ -60,20 +60,31 @@ do fi echo "Removing Koha instance $name" - mysql_hostname="localhost" - if [ "$keepmysql" != "1" ] - then - # The grant creates the user in case it isn't, we don't want our loop to fail if it has already being deleted. - mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <