File: run_imports.sh

package info (click to toggle)
tryton-server 7.0.30-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,756 kB
  • sloc: python: 53,218; xml: 5,194; sh: 802; sql: 217; makefile: 28
file content (19 lines) | stat: -rwxr-xr-x 573 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

_CODES="$@"
db_name="tryton"

# get database settings from dbconfig-common
if [ -f /etc/dbconfig-common/tryton-server-postgresql.conf ]; then
    . /etc/dbconfig-common/tryton-server-postgresql.conf
fi

if [ ! -z "$dbc_dbname" ]; then
    db_name=$dbc_dbname
fi

/usr/bin/trytond_import_currencies -c /etc/tryton/trytond.conf -d "$db_name" || true
/usr/bin/trytond_import_countries -c /etc/tryton/trytond.conf -d "$db_name" || true
if [ ! -z "$_CODES" ]; then
    /usr/bin/trytond_import_postal_codes -c /etc/tryton/trytond.conf -d "$db_name" $_CODES || true
fi