summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-08-24 00:16:26 +0000
committerivan <ivan>2002-08-24 00:16:26 +0000
commit5ba6bdd59b4a8a10c92e71b0519e87ca4ab99043 (patch)
treeedc465a6eb18ad87cc71a4ee997a544de2ee070f
parenteb6cb474f653dc738b26c9f8ca9b43e9b6f1e546 (diff)
Added Files: bin/freeside-addoutsource
-rw-r--r--FS/MANIFEST1
-rw-r--r--FS/bin/freeside-addoutsource24
2 files changed, 25 insertions, 0 deletions
diff --git a/FS/MANIFEST b/FS/MANIFEST
index 5737d620f..18842df23 100644
--- a/FS/MANIFEST
+++ b/FS/MANIFEST
@@ -7,6 +7,7 @@ bin/freeside-bill
bin/freeside-daily
bin/freeside-email
bin/freeside-queued
+bin/freeside-addoutsource
bin/freeside-apply-credits
bin/freeside-adduser
bin/freeside-setinvoice
diff --git a/FS/bin/freeside-addoutsource b/FS/bin/freeside-addoutsource
new file mode 100644
index 000000000..39ecba6ad
--- /dev/null
+++ b/FS/bin/freeside-addoutsource
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+domain=$1
+
+createdb $domain && \
+\
+mkdir /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=$domain && \
+\
+chown freeside /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=$domain && \
+\
+cp /home/ivan/freeside/conf[a-z]* /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=$domain && \
+\
+touch /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=$domain/secrets && \
+\
+chown freeside /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=$domain/secrets && \
+\
+chmod 600 /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=$domain/secrets && \
+\
+echo -e "DBI:Pg:host=localhost;dbname=$domain\nfreeside\n" >/usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=$domain/secrets && \
+\
+mkdir /usr/local/etc/freeside/counters.DBI:Pg:host=localhost\;dbname=$domain && \
+mkdir /usr/local/etc/freeside/cache.DBI:Pg:host=localhost\;dbname=$domain && \
+mkdir /usr/local/etc/freeside/export.DBI:Pg:host=localhost\;dbname=$domain
+