diff options
Diffstat (limited to 'FS/bin/freeside-addoutsource')
-rw-r--r-- | FS/bin/freeside-addoutsource | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/FS/bin/freeside-addoutsource b/FS/bin/freeside-addoutsource new file mode 100644 index 000000000..9cb12195a --- /dev/null +++ b/FS/bin/freeside-addoutsource @@ -0,0 +1,32 @@ +#!/bin/sh + +domain=$1 + +FREESIDE_CONF=%%%FREESIDE_CONF%%% +FREESIDE_CACHE=%%%FREESIDE_CACHE%%% +FREESIDE_EXPORT=%%%FREESIDE_EXPORT%%% + +#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 $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain && \ +\ +chown freeside $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain && \ +\ +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 $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \ +\ +chmod 600 $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \ +\ +echo -e "DBI:Pg:dbname=$domain\nfreeside\n" >$FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \ +\ +mkdir $FREESIDE_CACHE/counters.DBI:Pg:dbname=$domain && \ +mkdir $FREESIDE_CACHE/cache.DBI:Pg:dbname=$domain && \ +mkdir $FREESIDE_EXPORT/export.DBI:Pg:dbname=$domain + |