[DRE-commits] [diaspora] 04/05: db config, env varibale setup, templates in common
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Sat May 2 12:25:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository diaspora.
commit e110ac6c5f729271af389cb23a9f625ca61b11ee
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Sat May 2 16:10:17 2015 +0530
db config, env varibale setup, templates in common
---
debian/config | 31 -------------------------------
debian/postinst | 32 ++++++--------------------------
debian/templates | 12 ------------
3 files changed, 6 insertions(+), 69 deletions(-)
diff --git a/debian/config b/debian/config
deleted file mode 100644
index c7cb48d..0000000
--- a/debian/config
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# config maintainer script for gnukhata-core-engine
-
-set -e
-
-# source debconf stuff
-. /usr/share/debconf/confmodule
-
-# source dbconfig-common shell library, and call the hook function
-if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
- . /usr/share/dbconfig-common/dpkg/config.pgsql
-
- dbc_dbname="diaspora_production"
- dbc_dbuser="diaspora"
-
- dbc_go diaspora $@
-fi
-
-# What is your pod address?
-db_input high diaspora/url || true
-db_go
-
-# Configure pod address.
-db_get diaspora/url
-
-/usr/lib/diaspora-common/scripts/set-env-nginx.sh $RET
-
-if [ "$RET" = "false" ]; then
- db_go
-fi
-
diff --git a/debian/postinst b/debian/postinst
index d0451f9..f902ef8 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -26,39 +26,21 @@ set -e
# `abort-remove' or `abort-deconfigure'.
-. /usr/share/debconf/confmodule
-. /usr/share/dbconfig-common/dpkg/postinst.pgsql
-
-dbc_dbname="diaspora_production"
-dbc_dbuser="diaspora"
-
-dbc_go diaspora $@
-
case "$1" in
configure)
- /usr/lib/diaspora-common/scripts/adduser.sh
- /usr/lib/diaspora-common/scripts/grantpriv.sh
- mkdir -p /var/log/diaspora
- chown -R diaspora: /usr/share/diaspora
- cd /usr/share/diaspora
- echo "Installing gems with rubygems (their debian packages have bugs)..."
+ . /etc/diaspora/diaspora-common.conf
+ cd ${diaspora_home}
+# echo "Installing gems with rubygems (their debian packages have bugs)..."
# These gems need more work before they can be apt-get
# if ! gem list ^devise$ | grep devise
# then gem install -v=3.4.1 devise
# fi
- if ! grep RAILS_ENV /etc/diaspora.conf
- then echo export RAILS_ENV=production >> /etc/diaspora.conf
- fi
-
- if ! grep DB /etc/diaspora.conf
- then echo export DB=postgres >> /etc/diaspora.conf
- fi
+ echo "Setting up environment varibales..."
+ /usr/lib/diaspora-common/scripts/set-env-diaspora.sh
+ echo RAILS_ENV=$RAILS_ENV DB=$DB ENVIRONMENT_URL=$ENVIRONMENT_URL
- # source diaspora variables
- . /etc/diaspora.conf
- export ENVIRONMENT_URL=https://${SERVERNAME}
echo "Verifying we have all required libraries..."
sudo -u diaspora -E bundle install --local
echo "Initializing database..."
@@ -84,7 +66,5 @@ case "$1" in
;;
esac
-db_stop
-
exit 0
diff --git a/debian/templates b/debian/templates
deleted file mode 100644
index 02dda10..0000000
--- a/debian/templates
+++ /dev/null
@@ -1,12 +0,0 @@
-Template: diaspora/url
-Type: string
-Default: localhost
-Description: Set hostname for your diaspora pod
- Set the hostname of the machine you're running Diaspora on, as seen
- from the internet. This should be the domain name you want to use to
- access the pod. So if you plan to use a reverse proxy, it should be
- the hostname the proxy listens on. DO NOT CHANGE THIS AFTER INITIAL SETUP!
- If you do change the hostname, you will have to start again as the hostname
- will be hardcoded into the database.
- .
- Examples: example.com, pod.example.com etc
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora.git
More information about the Pkg-ruby-extras-commits
mailing list