# HG changeset patch # User Tom Gottfried # Date 1552647964 -3600 # Node ID a3cab473304d6b9067da0ce2b92c70e0234683dc # Parent 906e9a13592f3eda234d4c2a87035b1fc8d50139 Drop roles even if database does not exist diff -r 906e9a13592f -r a3cab473304d schema/install-db.sh --- a/schema/install-db.sh Fri Mar 15 11:14:21 2019 +0100 +++ b/schema/install-db.sh Fri Mar 15 12:06:04 2019 +0100 @@ -158,7 +158,7 @@ echo "Really drop database '$db' and all gemma roles? [type 'yes']: " read a if [[ $a == "yes" ]] ; then - dropdb -p "$port" "$db" + dropdb --if-exists -p "$port" "$db" psql -p $port -A -t -c '\du' | awk -F '|' -v port=$port \ '$1 "." $3 ~ /waterway_user|waterway_admin|sys_admin|metamorph/ \ { system("dropuser -p " port " \"" $1 "\"") }'