From e4154cd92ecc9a796dc7954b54f6c8bc0424efb2 Mon Sep 17 00:00:00 2001 From: SJ Date: Sun, 13 Oct 2013 21:39:34 +0200 Subject: [PATCH] debian related fixes --- debian/postinst | 8 +++++--- etc/Makefile.in | 1 + util/postinstall.sh.in | 5 ++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/debian/postinst b/debian/postinst index 54917d01..8c3bf002 100644 --- a/debian/postinst +++ b/debian/postinst @@ -19,6 +19,8 @@ generate_key_file() { if [ ! -f /usr/local/etc/piler.key ]; then echo "generating key file . . ." dd if=/dev/urandom bs=56 count=1 of=/usr/local/etc/piler.key + chgrp piler /usr/local/etc/piler.key + chmod 640 /usr/local/etc/piler.key fi } @@ -27,8 +29,8 @@ fi fix_permissions() { chown piler:piler /usr/local/bin/pilerexport /usr/local/bin/pilerpurge /usr/local/bin/pilerimport /usr/local/bin/pilerget /usr/local/bin/pileraget /usr/local/bin/reindex chmod +s /usr/local/bin/pilerexport /usr/local/bin/pilerpurge /usr/local/bin/pilerimport /usr/local/bin/pilerget /usr/local/bin/pileraget /usr/local/bin/reindex - chgrp piler /usr/local/etc/piler.conf /usr/local/etc/piler.key - chmod 640 /usr/local/etc/piler.conf /usr/local/etc/piler.key + chgrp piler /usr/local/etc/piler.conf + chmod 640 /usr/local/etc/piler.conf } @@ -37,7 +39,7 @@ case "$1" in chown piler:piler /var/run/piler /var/piler/store /var/piler/tmp generate_pem_file - generate_key_file + ###generate_key_file fix_permissions ldconfig diff --git a/etc/Makefile.in b/etc/Makefile.in index e029beb7..eefc4214 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -31,6 +31,7 @@ all: install: if [ ! -f "$(DESTDIR)$(sysconfdir)/piler.conf" ]; then $(INSTALL) -m 0640 -g $(RUNNING_GROUP) $(srcdir)/piler.conf $(DESTDIR)$(sysconfdir)/piler.conf; fi + $(INSTALL) -m 0644 -g $(RUNNING_GROUP) $(srcdir)/sphinx.conf.in $(DESTDIR)$(sysconfdir)/sphinx.conf.dist; fi clean: rm -f piler.conf cron.jobs diff --git a/util/postinstall.sh.in b/util/postinstall.sh.in index 62bf3e24..8d540097 100755 --- a/util/postinstall.sh.in +++ b/util/postinstall.sh.in @@ -336,9 +336,8 @@ execute_post_install_tasks() { mysql -h $MYSQL_HOSTNAME -u $MYSQL_USERNAME --password=$MYSQL_PASSWORD $MYSQL_DATABASE < $DATAROOTDIR/piler/db-mysql.sql echo "Done." - echo -n "Overwriting sphinx configuration... "; - sed -e "s%MYSQL_HOSTNAME%$MYSQL_HOSTNAME%" -e "s%MYSQL_DATABASE%$MYSQL_DATABASE%" -e "s%MYSQL_USERNAME%$MYSQL_USERNAME%" -e "s%MYSQL_PASSWORD%$MYSQL_PASSWORD%" etc/sphinx.conf.in > etc/sphinx.conf - cp etc/sphinx.conf $SPHINXCFG + echo -n "Writing sphinx configuration... "; + sed -e "s%MYSQL_HOSTNAME%$MYSQL_HOSTNAME%" -e "s%MYSQL_DATABASE%$MYSQL_DATABASE%" -e "s%MYSQL_USERNAME%$MYSQL_USERNAME%" -e "s%MYSQL_PASSWORD%$MYSQL_PASSWORD%" $SYSCONFDIR/sphinx.conf.dist > $SPHINXCFG echo "Done." echo -n "Initializing sphinx indices... ";