DO open a database connection in the parent process, this cached the $dbdef and speed...
[freeside.git] / FS / bin / freeside-addoutsourceuser
1 #!/bin/sh
2
3 username=$1
4 domain=$2
5 password=$3
6
7 freeside-adduser -h /usr/local/etc/freeside/htpasswd \
8                  -s conf.DBI:Pg:host=localhost\;dbname=$domain/secrets \
9                  -b \
10                  $username $password 2>/dev/null
11
12 [ -e /usr/local/etc/freeside/dbdef.DBI:Pg:host=localhost\;dbname=$domain ] \
13  || ( freeside-setup -s $username 2>/dev/null; \
14       /home/ivan/freeside/bin/populate-msgcat $username 2>/dev/null )
15