Changed database user to postgres
This commit is contained in:
parent
7576beb072
commit
eee9339ee8
|
|
@ -1,9 +1,9 @@
|
||||||
# Note that server id and passcode needs to be changed
|
# Note that server id and passcode needs to be changed
|
||||||
ServerId MY-SERVER-ID
|
ServerId APRSDIR-3
|
||||||
PassCode 11111
|
PassCode 30376
|
||||||
|
|
||||||
MyAdmin "My Name, MySignal"
|
MyAdmin "Per Qvarforth, SM4WJF"
|
||||||
MyEmail me@domain.com
|
MyEmail per@qvarforth.se
|
||||||
|
|
||||||
disallow_unverified false
|
disallow_unverified false
|
||||||
RunDir data
|
RunDir data
|
||||||
|
|
@ -27,4 +27,4 @@ HTTPStatusOptions ShowEmail=1
|
||||||
# After configuring the rest of the settings, remove this bad command
|
# After configuring the rest of the settings, remove this bad command
|
||||||
# from the configuration file. It's here only to avoid starting the
|
# from the configuration file. It's here only to avoid starting the
|
||||||
# server up accidentally with an invalid configuration.
|
# server up accidentally with an invalid configuration.
|
||||||
MagicBadness 42.7
|
#MagicBadness 42.7
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ coverage_percentile="95"
|
||||||
;; If using docker, set host to "db", otherwise "127.0.0.1"
|
;; If using docker, set host to "db", otherwise "127.0.0.1"
|
||||||
host="db"
|
host="db"
|
||||||
database="trackdirect"
|
database="trackdirect"
|
||||||
username="root"
|
username="postgres"
|
||||||
password="foobar"
|
password="foobar"
|
||||||
port="5432"
|
port="5432"
|
||||||
|
|
||||||
|
|
|
||||||
2
crontab
2
crontab
|
|
@ -1,2 +1,2 @@
|
||||||
40 * * * * ~/trackdirect/server/scripts/remover.sh trackdirect.ini
|
40 * * * * ~/trackdirect/server/scripts/remover.sh trackdirect.ini
|
||||||
*/30 * * * * ~/trackdirect/server/scripts/ogn_devices_install.sh trackdirect db 5432
|
*/30 * * * * ~/trackdirect/server/scripts/ogn_devices_install.sh trackdirect db 5432 postgres
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: trackdirect-db.dockerfile
|
dockerfile: trackdirect-db.dockerfile
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: root
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: foobar
|
POSTGRES_PASSWORD: foobar
|
||||||
POSTGRES_DB: trackdirect
|
POSTGRES_DB: trackdirect
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ else
|
||||||
sleep 30
|
sleep 30
|
||||||
export PYTHONPATH=$PYTHONPATH:$CURRENTDIR/../trackdirect
|
export PYTHONPATH=$PYTHONPATH:$CURRENTDIR/../trackdirect
|
||||||
cd $CURRENTDIR/../..
|
cd $CURRENTDIR/../..
|
||||||
$CURRENTDIR/ogn_devices_install.sh trackdirect db 5432
|
$CURRENTDIR/ogn_devices_install.sh trackdirect db 5432 postgres
|
||||||
python $CURRENTDIR/../bin/collector.py $CONFIGFILE $COLLECTORNUMBER
|
python $CURRENTDIR/../bin/collector.py $CONFIGFILE $COLLECTORNUMBER
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,14 @@
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "No arguments supplied"
|
echo "No arguments supplied"
|
||||||
echo "$0 [dbname] [dbport]"
|
echo "$0 [dbname] [dbport] [dbuser]"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DATABASE=$1
|
DATABASE=$1
|
||||||
HOST=$2
|
HOST=$2
|
||||||
PORT=$3
|
PORT=$3
|
||||||
|
USER=$4
|
||||||
|
|
||||||
pushd `dirname $0` > /dev/null
|
pushd `dirname $0` > /dev/null
|
||||||
SCRIPTPATH=`pwd -P`
|
SCRIPTPATH=`pwd -P`
|
||||||
|
|
@ -34,7 +35,7 @@ else
|
||||||
sed '/^#/ d' < ogndevices.csv > ogndevices2.csv
|
sed '/^#/ d' < ogndevices.csv > ogndevices2.csv
|
||||||
|
|
||||||
# Load file into database (assumes .pgpass is correctly set)
|
# Load file into database (assumes .pgpass is correctly set)
|
||||||
psql -h $HOST -p $PORT $DATABASE << EOF
|
psql -h $HOST -p $PORT $DATABASE -U $USER << EOF
|
||||||
|
|
||||||
create table if not exists ogn_device (
|
create table if not exists ogn_device (
|
||||||
"device_type" text not null,
|
"device_type" text not null,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue