Work on debian package

This commit is contained in:
Laurent Destailleur
2011-08-01 18:58:37 +00:00
parent 2e3305a533
commit a74526b3d2
4 changed files with 31 additions and 32 deletions

View File

@@ -4,6 +4,6 @@ dolibarr (3.1.0-1.1) unstable; urgency=low
* New upstream release.
closes: bug#634783
-- Laurent Destailleur <eldy@users.sourceforge.net> Mon, 30 Jul 2011 12:00:00 +0100
-- Dolibarr team <contact@dolibarr.org> Mon, 30 Jul 2011 12:00:00 +0100
# For a changelog file dedicated to users, see /usr/share/doc/dolibarr/UserChangeLog.gz file.

View File

@@ -13,25 +13,29 @@ db_version 2.0
echo Run the dolibarr config script
# Rotate old configuration
if [ "$1" = "reconfigure" ] ; then
config="/etc/dolibarr/apache.conf"
for i in $(seq 8 -1 0) ; do
if [ -f ${config}.$i ] ; then
mv ${config}.$i ${config}.$(($i +1))
fi
done
mv ${config} ${config}.0
fi
#if [ "$1" = "reconfigure" ] ; then
# config="/etc/dolibarr/apache.conf"
# if [ -f $config ] ; then
# for i in $(seq 8 -1 0) ; do
# if [ -f ${config}.$i ] ; then
# mv ${config}.$i ${config}.$(($i +1))
# fi
# done
# mv ${config} ${config}.0
# fi
#fi
# Rotate old configuration
if [ "$1" = "reconfigure" ] ; then
config="/etc/dolibarr/lighttpd.conf"
for i in $(seq 8 -1 0) ; do
if [ -f ${config}.$i ] ; then
mv ${config}.$i ${config}.$(($i +1))
fi
done
mv ${config} ${config}.0
fi
#if [ "$1" = "reconfigure" ] ; then
# config="/etc/dolibarr/lighttpd.conf"
# if [ -f $config ] ; then
# for i in $(seq 8 -1 0) ; do
# if [ -f ${config}.$i ] ; then
# mv ${config}.$i ${config}.$(($i +1))
# fi
# done
# mv ${config} ${config}.0
# fi
#fi
db_capb backup
@@ -39,8 +43,9 @@ db_capb backup
db_title "dolibarr" || true
# Ask for web server type.
#db_input critical "dolibarr/webserver" || true
# Ask if we must delete database
echo "Ask for web server to setup"
db_input critical dolibarr/reconfigure-webserver || true
if db_go ; then
okcancel="1"

View File

@@ -20,7 +20,7 @@ lighttpd_install() {
if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
if which lighty-enable-mod >/dev/null 2>&1 ; then
echo "Add link for Lighttpd config file"
ln -s /etc/dolibarr/lighttpd.conf /etc/lighttpd/conf-available/50-dolibarr.conf
ln -fs /etc/dolibarr/lighttpd.conf /etc/lighttpd/conf-available/50-dolibarr.conf
# We enabled it
lighty-enable-mod dolibarr fastcgi-php
else
@@ -33,7 +33,7 @@ apache_install() {
webserver=$1
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
echo "Add link for Apache config file"
ln -s /etc/dolibarr/apache.conf /etc/$webserver/conf.d/dolibarr.conf
ln -fs /etc/dolibarr/apache.conf /etc/$webserver/conf.d/dolibarr.conf
fi
}
@@ -92,14 +92,6 @@ case "$1" in
fi
# Reconfigure web server
db_reset dolibarr/reconfigure-webserver
# Ask if we must delete database
echo "Ask for web server to setup"
db_input critical dolibarr/reconfigure-webserver || true
db_go || true
db_get dolibarr/reconfigure-webserver
webservers="$RET"

View File

@@ -65,10 +65,12 @@ case "$1" in
# Call when we upgrade
upgrade)
echo "postrm upgrade"
;;
# Call when we uninstall
remove)
echo "postrm remove"
rm -f $lockfile
# Reconfigure web server
@@ -98,7 +100,7 @@ case "$1" in
# Call when we uninstall and purge
purge)
echo "postrm purge webservers=$webservers"
echo "postrm purge"
# Ask if we must delete database
echo "postrm db_input dolibarr/postrm"