summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-addoutsource
blob: 386e76315cb07996d8a0b190680acf54fb4fafc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

domain=$1

createdb $domain && \
\
mkdir /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain && \
\
chown freeside /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain && \
\
cp /home/ivan/freeside/conf/[a-z]* /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain


touch /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
\
chown freeside /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
\
chmod 600 /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
\
echo -e "DBI:Pg:dbname=$domain\nfreeside\n" >/usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
\
mkdir /usr/local/etc/freeside/counters.DBI:Pg:dbname=$domain && \
mkdir /usr/local/etc/freeside/cache.DBI:Pg:dbname=$domain && \
mkdir /usr/local/etc/freeside/export.DBI:Pg:dbname=$domain