Added checking for config file.

master
Matt Theissen 4 years ago
parent 00fed2b040
commit f2e33a5cd8

@ -1,22 +1,15 @@
#!/usr/bin/env sh
## **Config file should have the following:
## #Config
## ## Starting balance
## bal="00.00"
##
## ## Postgres
## ### Database user
## dbuser="ddbank"
## ### Database Port
## dbport="5432"
## ### Datavase host
## dbhost="knd-db01.kniod.corp"
## ### Database name
## datab="ddbank"
if [ -f $HOME/git/knd-ddbank/ddbank_config ]; then {
source $HOME/git/knd-ddbank/ddbank_config
} else {
echo "Configuration file not present."
echo "Refer to the Git README for setup"
echo ""
echo "https://git.skyfall.tech/theissenm/knd-ddbank/src/branch/master"
echo ""
exit 1
} fi
db_conn="psql -h $dbhost -p $dbport -U $dbuser -d $datab -c"