summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-addoutsourceuser
blob: abb515b6f163c489898521485f8051634868aa2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

username=$1
domain=$2
password=$3

freeside-adduser -h /usr/local/etc/freeside/htpasswd \
                 -s conf.DBI:Pg:host=localhost\;dbname=$domain/secrets \
                 -b \
                 $username $password 2>/dev/null

[ -e /usr/local/etc/freeside/dbdef.DBI:Pg:host=localhost\;dbname=$domain ] \
 || ( freeside-setup -s $username 2>/dev/null; \
      /home/ivan/freeside/bin/populate-msgcat $username 2>/dev/null )