mirror of
https://github.com/Dolibarr/dolibarr
synced 2024-11-22 17:33:01 +00:00
c885c6917e
# Qual: Ignore most shellcheck annotations, fix some Most shellcheck annotations are ignored - this is to make sure that ci can work for existing scripts. Some fixes were applied. pre-commit script was beautyfied by temporarily suppressing the IFS= expression on 2 lines.
84 lines
1.6 KiB
Bash
84 lines
1.6 KiB
Bash
#!/bin/sh
|
|
# Debian install package run: config, preinst, prerm, postinst, postrm
|
|
#
|
|
|
|
# shellcheck disable=1091,2034
|
|
|
|
set -e
|
|
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
db_version 2.0
|
|
|
|
|
|
echo Run the dolibarr config script
|
|
|
|
# Rotate old configuration
|
|
#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"
|
|
# 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
|
|
|
|
db_title "dolibarr" || 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"
|
|
else
|
|
okcancel="0"
|
|
fi
|
|
|
|
|
|
# Get the database administrator name and password.
|
|
#db_beginblock
|
|
# db_input critical "dolibarr/db/admin/name" || true
|
|
# db_input critical "dolibarr/db/admin/password" || true
|
|
#db_endblock
|
|
|
|
# Ask for DB name.
|
|
#db_input critical "dolibarr/db/name" || true
|
|
|
|
# Get the DBMS account username
|
|
#db_input critical "dolibarr/db/user/name" || true
|
|
|
|
# Get the DBMS account password
|
|
#db_input critical "dolibarr/db/user/password" || true
|
|
|
|
# Ask for deleting all the database on package purge.
|
|
#db_input critical "dolibarr/postrm" || true
|
|
|
|
# Launch input screens
|
|
#db_go || true
|
|
|
|
onsuccess='finished="true"'
|
|
db_stop
|
|
|
|
exit 0
|