summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-addoutsource
diff options
context:
space:
mode:
authorivan <ivan>2006-12-14 09:27:26 +0000
committerivan <ivan>2006-12-14 09:27:26 +0000
commit7422aa77086326ba1e6032150ce5704d1003ea6f (patch)
tree9a69bc3c41f13a944198ae882933aa51cc9f6a5c /FS/bin/freeside-addoutsource
parentdcdf657e77ec7b46dc69e19a849a9c133123db7c (diff)
make the config directory configurable
Diffstat (limited to 'FS/bin/freeside-addoutsource')
-rw-r--r--FS/bin/freeside-addoutsource29
1 files changed, 17 insertions, 12 deletions
diff --git a/FS/bin/freeside-addoutsource b/FS/bin/freeside-addoutsource
index 386e76315..8291c6434 100644
--- a/FS/bin/freeside-addoutsource
+++ b/FS/bin/freeside-addoutsource
@@ -2,24 +2,29 @@
domain=$1
+FREESIDE_CONF=%%%FREESIDE_CONF%%%
+
+#without this, [a-z]* matches CVS/, the copy doesn't return a sucessful error
+# status, and the rest of the commands aren't run
+export LANG=C
+
createdb $domain && \
\
-mkdir /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain && \
+mkdir $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain && \
\
-chown freeside /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain && \
+chown freeside $FREESIDE_CONF/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 && \
+cp /home/ivan/freeside/conf/[a-z]* $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain && \
+\
+touch $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \
\
-chown freeside /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
+chown freeside $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \
\
-chmod 600 /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
+chmod 600 $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \
\
-echo -e "DBI:Pg:dbname=$domain\nfreeside\n" >/usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
+echo -e "DBI:Pg:dbname=$domain\nfreeside\n" >$FREESIDE_CONF/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
+mkdir $FREESIDE_CONF/counters.DBI:Pg:dbname=$domain && \
+mkdir $FREESIDE_CONF/cache.DBI:Pg:dbname=$domain && \
+mkdir $FREESIDE_CONF/export.DBI:Pg:dbname=$domain