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. * New upstream release.
closes: bug#634783 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. # 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 echo Run the dolibarr config script
# Rotate old configuration # Rotate old configuration
if [ "$1" = "reconfigure" ] ; then #if [ "$1" = "reconfigure" ] ; then
config="/etc/dolibarr/apache.conf" # config="/etc/dolibarr/apache.conf"
for i in $(seq 8 -1 0) ; do # if [ -f $config ] ; then
if [ -f ${config}.$i ] ; then # for i in $(seq 8 -1 0) ; do
mv ${config}.$i ${config}.$(($i +1)) # if [ -f ${config}.$i ] ; then
fi # mv ${config}.$i ${config}.$(($i +1))
done # fi
mv ${config} ${config}.0 # done
fi # mv ${config} ${config}.0
# fi
#fi
# Rotate old configuration # Rotate old configuration
if [ "$1" = "reconfigure" ] ; then #if [ "$1" = "reconfigure" ] ; then
config="/etc/dolibarr/lighttpd.conf" # config="/etc/dolibarr/lighttpd.conf"
for i in $(seq 8 -1 0) ; do # if [ -f $config ] ; then
if [ -f ${config}.$i ] ; then # for i in $(seq 8 -1 0) ; do
mv ${config}.$i ${config}.$(($i +1)) # if [ -f ${config}.$i ] ; then
fi # mv ${config}.$i ${config}.$(($i +1))
done # fi
mv ${config} ${config}.0 # done
fi # mv ${config} ${config}.0
# fi
#fi
db_capb backup db_capb backup
@@ -39,8 +43,9 @@ db_capb backup
db_title "dolibarr" || true db_title "dolibarr" || true
# Ask for web server type. # Ask if we must delete database
#db_input critical "dolibarr/webserver" || true echo "Ask for web server to setup"
db_input critical dolibarr/reconfigure-webserver || true
if db_go ; then if db_go ; then
okcancel="1" okcancel="1"

View File

@@ -20,7 +20,7 @@ lighttpd_install() {
if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
if which lighty-enable-mod >/dev/null 2>&1 ; then if which lighty-enable-mod >/dev/null 2>&1 ; then
echo "Add link for Lighttpd config file" 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 # We enabled it
lighty-enable-mod dolibarr fastcgi-php lighty-enable-mod dolibarr fastcgi-php
else else
@@ -33,7 +33,7 @@ apache_install() {
webserver=$1 webserver=$1
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
echo "Add link for Apache config file" 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 fi
} }
@@ -92,14 +92,6 @@ case "$1" in
fi 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 db_get dolibarr/reconfigure-webserver
webservers="$RET" webservers="$RET"

View File

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