[Debian-l10n-commits] r2776 - in /pootle/trunk/debian: pootle.config pootle.postinst
themill-guest at users.alioth.debian.org
themill-guest at users.alioth.debian.org
Wed Nov 16 16:08:37 UTC 2011
Author: themill-guest
Date: Wed Nov 16 16:08:36 2011
New Revision: 2776
URL: http://svn.debian.org/wsvn/?sc=1&rev=2776
Log:
Improve standalone and non-dbconfig cases
Modified:
pootle/trunk/debian/pootle.config
pootle/trunk/debian/pootle.postinst
Modified: pootle/trunk/debian/pootle.config
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/pootle.config?rev=2776&op=diff
==============================================================================
--- pootle/trunk/debian/pootle.config (original)
+++ pootle/trunk/debian/pootle.config Wed Nov 16 16:08:36 2011
@@ -20,7 +20,8 @@
dbc_go pootle $@
fi
-if [ -f /etc/init.d/pootle ]; then
+if [ -x /etc/init.d/pootle ] && \
+ /etc/init.d/pootle status | grep -q "server running"; then
db_set pootle/webserver standalone
elif [ -f /etc/apache2/apache2.conf ]; then
db_set pootle/webserver apache2
Modified: pootle/trunk/debian/pootle.postinst
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/pootle.postinst?rev=2776&op=diff
==============================================================================
--- pootle/trunk/debian/pootle.postinst (original)
+++ pootle/trunk/debian/pootle.postinst Wed Nov 16 16:08:36 2011
@@ -116,6 +116,11 @@
fi
}
+do_db_update() {
+ # all upgrades
+ su $POOTLE_USER -p -c "django-admin updatedb --settings=pootle.settings"
+}
+
case "$1" in
configure|reconfigure)
set_permissions
@@ -123,11 +128,13 @@
fix_db_encoding
if [ -z "$2" ]; then
# new installation
- su $POOTLE_USER -p -c "
- django-admin syncdb --settings pootle.settings --noinput
- django-admin initdb --settings pootle.settings
- django-admin refresh_stats --settings pootle.settings
- "
+ if [ $dbc_install != 'false' ]; then
+ su $POOTLE_USER -p -c "
+ django-admin syncdb --settings pootle.settings --noinput
+ django-admin initdb --settings pootle.settings
+ django-admin refresh_stats --settings pootle.settings
+ "
+ fi
# createsuperuser ? => use debconf for this
elif dpkg --compare-versions "$2" lt 1.3.0~beta3-1; then
# lenny -> squeeze upgrade
@@ -138,12 +145,11 @@
python /usr/share/pyshared/pootle/tools/import_old_prefs.py /etc/pootle/pootle.prefs /etc/pootle/users.prefs
django-admin refresh_stats --settings pootle.settings
"
+ do_db_update
elif dpkg --compare-versions "$2" lt 2.0.6; then
# squeeze -> wheezy upgrade
- :
+ do_db_update
fi
- # all upgrades; doesn't hurt on new installs
- su $POOTLE_USER -p -c "django-admin updatedb --settings=pootle.settings"
# Configure webserver
db_get pootle/webserver || ${RET-none}
More information about the Debian-l10n-commits
mailing list