summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorivan <ivan>2001-10-30 13:47:07 +0000
committerivan <ivan>2001-10-30 13:47:07 +0000
commita8989c556a7a1951a0b34942c6289f26395859d7 (patch)
tree165dd906f6557b97108cc0d2aed76f8ec6afd72d /Makefile
parent56fc68db7603aaa06df25bb053d46cdfb2599c18 (diff)
`make create-config' installs default config (conf dir update)
freeside-adduser uses default secrets file
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 9 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index ae385d85e..312609afd 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ docs:
make ${TEMPLATE}docs
install-docs: docs
- mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S`
+ [ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S`
cp -r ${TEMPLATE}docs ${FREESIDE_DOCUMENT_ROOT}
perl-modules:
@@ -64,7 +64,8 @@ create-database:
perl -e 'use DBIx::DataSource qw( create_database ); create_database( \'${DATASOURCE}\', \'${DB_USER}\', \'${DB_PASSWORD}\' ) or die $DBIx::DataSource::errstr;'
create-config: install-perl-modules
- [ -d ${FREESIDE_CONF} ] || mkdir ${FREESIDE_CONF}
+ [ -e ${FREESIDE_CONF} ] || mv ${FREESIDE_CONF} ${FREESIDE_CONF}.`date +%Y%m%d%H%M%S`
+ mkdir ${FREESIDE_CONF}
chown freeside ${FREESIDE_CONF}
touch ${FREESIDE_CONF}/secrets
@@ -75,20 +76,17 @@ create-config: install-perl-modules
chmod 600 ${FREESIDE_CONF}/secrets
chown freeside ${FREESIDE_CONF}/secrets
- [ -d "${FREESIDE_CONF}/conf.${DATASOURCE}" ] \
- || mkdir "${FREESIDE_CONF}/conf.${DATASOURCE}"
- chown freeside "${FREESIDE_CONF}/conf.${DATASOURCE}"
+ mkdir "${FREESIDE_CONF}/conf.${DATASOURCE}"
+ cp conf/* "${FREESIDE_CONF}/conf.${DATASOURCE}"
+ chown -R freeside "${FREESIDE_CONF}/conf.${DATASOURCE}"
- [ -d "${FREESIDE_CONF}/counters.${DATASOURCE}" ] \
- || mkdir "${FREESIDE_CONF}/counters.${DATASOURCE}"
+ mkdir "${FREESIDE_CONF}/counters.${DATASOURCE}"
chown freeside "${FREESIDE_CONF}/counters.${DATASOURCE}"
- [ -d "${FREESIDE_CONF}/cache.${DATASOURCE}" ] \
- || mkdir "${FREESIDE_CONF}/cache.${DATASOURCE}"
+ mkdir "${FREESIDE_CONF}/cache.${DATASOURCE}"
chown freeside "${FREESIDE_CONF}/cache.${DATASOURCE}"
- [ -d "${FREESIDE_CONF}/export.${DATASOURCE}" ] \
- || mkdir "${FREESIDE_CONF}/export.${DATASOURCE}"
+ mkdir "${FREESIDE_CONF}/export.${DATASOURCE}"
chown freeside "${FREESIDE_CONF}/export.${DATASOURCE}"
clean: