dolibarr.config 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #!/bin/sh
  2. # Debian install package run: config, preinst, prerm, postinst, postrm
  3. #
  4. set -e
  5. . /usr/share/debconf/confmodule
  6. db_version 2.0
  7. echo Run the dolibarr config script
  8. # Rotate old configuration
  9. #if [ "$1" = "reconfigure" ] ; then
  10. # config="/etc/dolibarr/apache.conf"
  11. # if [ -f $config ] ; then
  12. # for i in $(seq 8 -1 0) ; do
  13. # if [ -f ${config}.$i ] ; then
  14. # mv ${config}.$i ${config}.$(($i +1))
  15. # fi
  16. # done
  17. # mv ${config} ${config}.0
  18. # fi
  19. #fi
  20. # Rotate old configuration
  21. #if [ "$1" = "reconfigure" ] ; then
  22. # config="/etc/dolibarr/lighttpd.conf"
  23. # if [ -f $config ] ; then
  24. # for i in $(seq 8 -1 0) ; do
  25. # if [ -f ${config}.$i ] ; then
  26. # mv ${config}.$i ${config}.$(($i +1))
  27. # fi
  28. # done
  29. # mv ${config} ${config}.0
  30. # fi
  31. #fi
  32. db_capb backup
  33. db_title "dolibarr" || true
  34. # Ask if we must delete database
  35. echo "Ask for web server to setup"
  36. db_input critical dolibarr/reconfigure-webserver || true
  37. if db_go ; then
  38. okcancel="1"
  39. else
  40. okcancel="0"
  41. fi
  42. # Get the database administrator name and password.
  43. #db_beginblock
  44. # db_input critical "dolibarr/db/admin/name" || true
  45. # db_input critical "dolibarr/db/admin/password" || true
  46. #db_endblock
  47. # Ask for DB name.
  48. #db_input critical "dolibarr/db/name" || true
  49. # Get the DBMS account username
  50. #db_input critical "dolibarr/db/user/name" || true
  51. # Get the DBMS account password
  52. #db_input critical "dolibarr/db/user/password" || true
  53. # Ask for deleting all the database on package purge.
  54. #db_input critical "dolibarr/postrm" || true
  55. # Launch input screens
  56. #db_go || true
  57. onsuccess='finished="true"'
  58. db_stop
  59. exit 0