| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| #!/bin/bash |
| |
| echo "Creating POSTGRES DB FROM ENVIRONMENT" |
| DB_NAME=tapdb |
| DB_USER=tapuser |
| DB_PASS="Dr@p3rUs3r" |
| DB_SERVICE=postgres |
| |
| psql -U postgres -c "CREATE USER $DB_USER PASSWORD '$DB_PASS'" |
| psql -U postgres -c "CREATE DATABASE $DB_NAME OWNER $DB_USER" |
| psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER" |
| |
| #localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8 |
| ##export LANG=en_US.UTF-8 |
| #locale # confirm that it shows only en_US.UTF-8 for all settings |
| # finally, run your opennms installer |
| #/usr/share/opennms/bin/install -l /usr/local/lib -dis |