Fix on debian package
This commit is contained in:
parent
fe021c1e24
commit
607d4c6703
@ -18,22 +18,3 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
|||||||
Order deny,allow
|
Order deny,allow
|
||||||
Allow from all
|
Allow from all
|
||||||
</DirectoryMatch>
|
</DirectoryMatch>
|
||||||
|
|
||||||
#<DirectoryMatch /usr/share/dolibarr/htdocs/public/adherents/priv_*>
|
|
||||||
# Options Indexes FollowSymLinks
|
|
||||||
# AllowOverride All
|
|
||||||
# Order deny,allow
|
|
||||||
# Deny from all
|
|
||||||
#
|
|
||||||
# AuthType Basic
|
|
||||||
# Auth_MySQL_Authoritative on
|
|
||||||
# Auth_MySQL_DB dolibarr
|
|
||||||
# Auth_MySQL_Password_Table llx_adherent
|
|
||||||
# Auth_MySQL_Username_Field login
|
|
||||||
# Auth_MySQL_Password_Field pass
|
|
||||||
# Auth_MySQL_Encrypted_Passwords off
|
|
||||||
# AuthName "Adherents"
|
|
||||||
#
|
|
||||||
# require valid-user
|
|
||||||
# satisfy any
|
|
||||||
#</DirectoryMatch>
|
|
||||||
@ -58,9 +58,10 @@ case "$1" in
|
|||||||
config="/usr/share/dolibarr/htdocs/install/install.forced.php"
|
config="/usr/share/dolibarr/htdocs/install/install.forced.php"
|
||||||
cp -p $fileorig $config
|
cp -p $fileorig $config
|
||||||
|
|
||||||
# Create conf.php
|
# Create empty conf.php
|
||||||
if [ ! -f /usr/share/dolibarr/htdocs/conf/conf.php ]
|
if [ ! -f /usr/share/dolibarr/htdocs/conf/conf.php ]
|
||||||
then
|
then
|
||||||
|
echo Create empty file /usr/share/dolibarr/htdocs/conf/conf.php
|
||||||
touch /usr/share/dolibarr/htdocs/conf/conf.php
|
touch /usr/share/dolibarr/htdocs/conf/conf.php
|
||||||
chown -R www-data.www-data /usr/share/dolibarr/htdocs/conf/conf.php;
|
chown -R www-data.www-data /usr/share/dolibarr/htdocs/conf/conf.php;
|
||||||
chmod -R 750 /usr/share/dolibarr/htdocs/conf/conf.php;
|
chmod -R 750 /usr/share/dolibarr/htdocs/conf/conf.php;
|
||||||
@ -68,8 +69,8 @@ case "$1" in
|
|||||||
|
|
||||||
#db_reset "dolibarr/webserver"
|
#db_reset "dolibarr/webserver"
|
||||||
|
|
||||||
# Get the web server type.
|
# Get the web server type (use dbget for interactive mode).
|
||||||
db_get "dolibarr/webserver" # Read value for webserver.
|
# db_get "dolibarr/webserver" # Read value for webserver.
|
||||||
# webserver="$RET"
|
# webserver="$RET"
|
||||||
webserver="Both"
|
webserver="Both"
|
||||||
case $webserver in
|
case $webserver in
|
||||||
@ -78,18 +79,38 @@ case "$1" in
|
|||||||
Both) webservers="apache2 apache2-ssl" ;;
|
Both) webservers="apache2 apache2-ssl" ;;
|
||||||
*) webservers="" ;;
|
*) webservers="" ;;
|
||||||
esac
|
esac
|
||||||
|
# Define variable phpver and phpini
|
||||||
. /usr/share/wwwconfig-common/php.get
|
. /usr/share/wwwconfig-common/php.get
|
||||||
|
|
||||||
# Set up web server.
|
# Set up web server.
|
||||||
for server in $webservers ; do
|
for server in $webservers ; do
|
||||||
echo Complete config of server $server
|
echo Complete config of server $server
|
||||||
env_enable
|
env_enable
|
||||||
|
|
||||||
|
# Add info for PHP (might be obsolete)
|
||||||
typestr='application/x-httpd-php'
|
typestr='application/x-httpd-php'
|
||||||
extension='.php'
|
extension='.php'
|
||||||
. /usr/share/wwwconfig-common/apache-addtype_all.sh
|
. /usr/share/wwwconfig-common/apache-addtype_all.sh
|
||||||
. /usr/share/wwwconfig-common/apache-php.sh
|
|
||||||
. /usr/share/wwwconfig-common/apache-run.get
|
# Enable PHP module (might be obsolete)
|
||||||
trustuser=$webuser
|
#. /usr/share/wwwconfig-common/apache-php.sh
|
||||||
|
#echo Result of enabling PHP modules: $status
|
||||||
|
|
||||||
|
# Detect webuser and webgroup
|
||||||
|
webuser=
|
||||||
|
webgroup=
|
||||||
|
. /usr/share/wwwconfig-common/apache-run.get
|
||||||
|
echo Web user.group found is $webuser.$webgroup
|
||||||
|
|
||||||
|
if [ -z "$webuser" ] ; then
|
||||||
|
webuser=www-data
|
||||||
|
fi
|
||||||
|
if [ -z "$webgroup" ] ; then
|
||||||
|
webgroup=www-data
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo Web user.group used is $webuser.$webgroup
|
||||||
|
|
||||||
#
|
#
|
||||||
# That may lead to problems if apache & apache-ssl do
|
# That may lead to problems if apache & apache-ssl do
|
||||||
# not have the same user/group.
|
# not have the same user/group.
|
||||||
|
|||||||
@ -17,9 +17,15 @@ set -e
|
|||||||
# for details, see /usr/share/doc/packaging-manual/
|
# for details, see /usr/share/doc/packaging-manual/
|
||||||
|
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
db_version 2.0
|
db_version 2.0
|
||||||
|
|
||||||
|
#echo "postrm db_get dolibarr/webserver"
|
||||||
|
set +e
|
||||||
|
# We disable set -e to avoid premature end of script if error
|
||||||
db_get "dolibarr/webserver" || true
|
db_get "dolibarr/webserver" || true
|
||||||
webserver="$RET"
|
set -e
|
||||||
|
export webserver="$RET"
|
||||||
|
|
||||||
# Allows us to loop and substitute in one pass
|
# Allows us to loop and substitute in one pass
|
||||||
case $webserver in
|
case $webserver in
|
||||||
@ -28,12 +34,18 @@ case $webserver in
|
|||||||
Both) webservers="apache2 apache2-ssl" ;;
|
Both) webservers="apache2 apache2-ssl" ;;
|
||||||
*) webservers="" ;;
|
*) webservers="" ;;
|
||||||
esac
|
esac
|
||||||
includefile=/etc/dolibarr/apache.conf
|
export includefile=/etc/dolibarr/apache.conf
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
purge)
|
purge)
|
||||||
|
#echo "postrm purge webservers=$webservers includefile=$includefile"
|
||||||
|
|
||||||
|
#echo "postrm db_get dolibarr/postrm"
|
||||||
|
# We disable set -e to avoid premature end of script if error
|
||||||
|
set +e
|
||||||
db_get "dolibarr/postrm"
|
db_get "dolibarr/postrm"
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ "$RET" = "true" ] ; then
|
if [ "$RET" = "true" ] ; then
|
||||||
# Get database configuration
|
# Get database configuration
|
||||||
dbserver="localhost"
|
dbserver="localhost"
|
||||||
@ -51,24 +63,32 @@ case "$1" in
|
|||||||
|
|
||||||
# Remove include files
|
# Remove include files
|
||||||
for server in $webservers ; do
|
for server in $webservers ; do
|
||||||
error=""
|
export error=""
|
||||||
conffile="/etc/$server/httpd.conf"
|
export conffile="/etc/$server/httpd.conf"
|
||||||
# We disable set -e because script apache-uninclude.sh return error if not
|
#echo "postrm conffile=$conffile"
|
||||||
set +e
|
if [ -f $conffile ] ;
|
||||||
. /usr/share/wwwconfig-common/apache-uninclude.sh
|
then
|
||||||
set -e
|
if [ ! -s $conffile ] ;
|
||||||
# if [ "x$error" != "x" ] ;
|
then
|
||||||
# then echo $error
|
# We disable set -e to avoid premature end of script if error
|
||||||
# fi
|
set +e
|
||||||
|
. /usr/share/wwwconfig-common/apache-uninclude.sh
|
||||||
|
set -e
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ "$status" = "purge" ] ;
|
if [ "$status" = "purge" ] ;
|
||||||
then restart="$restart $server"
|
then restart="$restart $server"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -rf /etc/dolibarr
|
rm -rf /etc/dolibarr
|
||||||
|
|
||||||
# Restart
|
# Restart
|
||||||
servers="apache2-ssl apache2 mysql"
|
servers="apache2-ssl apache2 mysql"
|
||||||
. /usr/share/wwwconfig-common/restart.sh
|
if [ -f /usr/share/wwwconfig-common/restart.sh ] ;
|
||||||
|
then
|
||||||
|
. /usr/share/wwwconfig-common/restart.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove file and conf file
|
# Remove file and conf file
|
||||||
for dir in /usr/share/dolibarr ; do
|
for dir in /usr/share/dolibarr ; do
|
||||||
|
|||||||
@ -1,22 +1,22 @@
|
|||||||
Template: dolibarr/configuration/note
|
Template: dolibarr/configuration/note
|
||||||
Type: note
|
Type: note
|
||||||
Description: Package configuration note.
|
Description: Package configuration note.
|
||||||
dolibarr can be and should be configured entirely via web, so, in the
|
Dolibarr can be and should be configured entirely via web, so, in the
|
||||||
following configuration steps, I'm going to prompt you for the passwords that
|
following configuration steps, I'm going to prompt you for the passwords that
|
||||||
dolibarr uses for web configuration and some default values for the
|
Dolibarr uses for web configuration and some default values for the
|
||||||
application startup. Then you should point your browser to the dolibarr
|
application startup. Then you should point your browser to the Dolibarr
|
||||||
setup, for example:
|
setup, for example:
|
||||||
.
|
.
|
||||||
http://localhost/dolibarr/install.php
|
http://localhost/dolibarr/install.php
|
||||||
.
|
.
|
||||||
continue the configuration, fill the database and let dolibarr be aware of
|
continue the configuration, fill the database and let Dolibarr be aware of
|
||||||
the installed modules.
|
the installed modules.
|
||||||
|
|
||||||
Template: dolibarr/webserver
|
Template: dolibarr/webserver
|
||||||
Type: select
|
Type: select
|
||||||
Choices: Apache, Apache-ssl, Both, None
|
Choices: Apache, Apache-ssl, Both, None
|
||||||
Description: Which Web Server are you running?
|
Description: Which Web Server are you running?
|
||||||
dolibarr supports any web server with CGI capabilities, but this
|
Dolibarr supports any web server with PHP capabilities, but this
|
||||||
configuration process only supports Apache and Apache-SSL.
|
configuration process only supports Apache and Apache-SSL.
|
||||||
|
|
||||||
Template: dolibarr/db/setup/skip
|
Template: dolibarr/db/setup/skip
|
||||||
@ -27,7 +27,7 @@ Description: DB setup skipped.
|
|||||||
|
|
||||||
Template: dolibarr/db
|
Template: dolibarr/db
|
||||||
Type: text
|
Type: text
|
||||||
Description: dolibarr DB setup NOTE.
|
Description: Dolibarr DB setup NOTE.
|
||||||
Now you should specify the DBMS settings. You must provide the host name on
|
Now you should specify the DBMS settings. You must provide the host name on
|
||||||
which the DBMS server is installed, the type (i.e. MySql), the DB name, the DBMS administrator user-name, etc.
|
which the DBMS server is installed, the type (i.e. MySql), the DB name, the DBMS administrator user-name, etc.
|
||||||
|
|
||||||
@ -42,25 +42,25 @@ Template: dolibarr/db/port
|
|||||||
Type: string
|
Type: string
|
||||||
Default: 3306
|
Default: 3306
|
||||||
Description: Please, insert your database port:
|
Description: Please, insert your database port:
|
||||||
This should be the port value that dolibarr will use to access
|
This should be the port value that Dolibarr will use to access
|
||||||
the DB.
|
the DB.
|
||||||
|
|
||||||
Template: dolibarr/db/name
|
Template: dolibarr/db/name
|
||||||
Type: string
|
Type: string
|
||||||
Default: dolibarr
|
Default: dolibarr
|
||||||
Description: Please, insert dolibarr DB name:
|
Description: Please, insert Dolibarr database name:
|
||||||
This is the name of the DB that dolibarr will use.
|
This is the name of the database that Dolibarr will use.
|
||||||
|
|
||||||
Template: dolibarr/db/user/name
|
Template: dolibarr/db/user/name
|
||||||
Type: string
|
Type: string
|
||||||
Default: dolibarr
|
Default: dolibarr
|
||||||
Description: Please, insert the DBMS user-name to access the DB:
|
Description: Please, insert the DBMS user-name to access the DB:
|
||||||
This is the user-name that dolibarr will use to access the DB.
|
This is the user-name that Dolibarr will use to access the DB.
|
||||||
|
|
||||||
Template: dolibarr/db/user/password
|
Template: dolibarr/db/user/password
|
||||||
Type: password
|
Type: password
|
||||||
Description: Please, insert the password to access the DB:
|
Description: Please, insert the password to access the DB:
|
||||||
This is the password that dolibarr will use, along with user-name you
|
This is the password that Dolibarr will use, along with user-name you
|
||||||
provided, to access the DB.
|
provided, to access the DB.
|
||||||
|
|
||||||
Template: dolibarr/db/user/password/confirm
|
Template: dolibarr/db/user/password/confirm
|
||||||
@ -80,8 +80,8 @@ Default: root
|
|||||||
Description: Please, insert the DBMS administrator user-name:
|
Description: Please, insert the DBMS administrator user-name:
|
||||||
This user-name will be used to access the DBMS to create (if needed):
|
This user-name will be used to access the DBMS to create (if needed):
|
||||||
.
|
.
|
||||||
(1) The new dolibarr database
|
(1) The new Dolibarr database
|
||||||
(2) The new database account that dolibarr will use to access the DB
|
(2) The new database account that Dolibarr will use to access the DB
|
||||||
.
|
.
|
||||||
It should be 'root' for MySql.
|
It should be 'root' for MySql.
|
||||||
|
|
||||||
@ -98,5 +98,5 @@ Type: boolean
|
|||||||
Default: true
|
Default: true
|
||||||
Description: Delete *ALL*?
|
Description: Delete *ALL*?
|
||||||
Datas subjected to this question are the DBMS account, the DB and the
|
Datas subjected to this question are the DBMS account, the DB and the
|
||||||
dolibarr users ang group files. Do I have to delete *ALL* datas whenever
|
Dolibarr users ang group files. Do I have to delete *ALL* datas whenever
|
||||||
the dolibarr package will be completely removed from the system?
|
the Dolibarr package will be completely removed from the system?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user