summarylogtreecommitdiffstats
path: root/dolibarr.install
blob: b6ad8b1f63b355ed764adf3841fa982504512328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
post_install() {
	chown -R http:http var/lib/dolibarr
	chown http:http etc/webapps/dolibarr/conf.php
	echo 'Please configure your webserver. Example files are provided in /etc/webapps/dolibarr'
	echo 'It could be necessary to add /var/lib/dolibarr/ to open_basedir in php.ini'
	echo 'Finish installation by pointing your webbrowser to http://dolibarr.localdomain/install'
}

post_upgrade() {
	old=`expr $2 : '\([0-9]*\.[0-9]*\.\)'`"0"
	new=`expr $1 : '\([0-9]*\.[0-9]*\.\)'`"0"
	if [ $old == $new ]
	then
		if [ $old == '3.8.0' ]
		then
			old='3.7.0'
		fi	
	fi
	rm var/lib/dolibarr/install.lock
	cd usr/share/webapps/dolibarr/htdocs/install
	echo 'upgrade.php' $old $new
	php upgrade.php $old $new > /dev/null
	echo 'upgrade2.php' $old $new
	php upgrade2.php $old $new > /dev/null
	php step5.php $old $new > /dev/null
	cd /
	touch var/lib/dolibarr/install.lock
	chmod 444 var/lib/dolibarr/install.lock
}