summarylogtreecommitdiffstats
path: root/dolibarr.install
blob: cb48d155802b3b9f6b07501297644c3200f4faee (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
30
31
post_install() {
	chown -R http:http var/lib/dolibarr
	chown http:http etc/dolibarr/conf.php
	systemctl daemon-reload
	systemctl restart php-fpm-legacy.service
	echo 'Please configure your webserver. Example configuration files for nginx and apache are provided in /etc/dolibarr/contrib'
	echo 'We restarted php-fpm-legacy.service for you at it was necessary to give write permission to /usr/share/dolibarr and /etc/dolibarr'
	echo 'Finish installation by pointing your browser to https://erp.example.com where example.com will be replaced by the domain name you use'
}

post_upgrade() {
	old=`expr $2 : '\([0-9]*\.[0-9]*\.\)'`"0"
	new=`expr $1 : '\([0-9]*\.[0-9]*\.\)'`"0"
	if [ $old == $new ]
	then
		if [ $old == '18.0.0' ]
		then
			old='17.0.0'
		fi	
	fi
	rm /var/lib/dolibarr/install.lock
	cd /usr/share/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
}