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

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

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

[ -e /usr/local/etc/freeside/dbdef.DBI:Pg:dbname=$domain ] \
 || ( freeside-setup -d $realdomain $username 2>/dev/null )