summarylogtreecommitdiffstats
path: root/organizr.install
blob: 04d9359261df3d86e384ef7a79f876c6ed51af94 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
post_install() {
    chown -R http:http /var/lib/organizr

    echo '-------------------------------------------------------------------------------'
    echo 'Once you have added Organizr to your web server configuration, browse to'
    echo '<Your Organizer URL>/check.php to see if you need to enable any PHP extensions.'
    echo
    echo 'The directory /var/lib/organizr was created to store your Organizr DB and config.'
    echo 'Specify this directory as the Database Path when visiting the main site for the'
    echo 'first time.'
    echo '-------------------------------------------------------------------------------'
}

post_upgrade() {
    chown -R http:http /var/lib/organizr

    if [[ -e /opt/organizr/api/config/config.php ]]; then
	echo '-------------------------------------------------------------------------------'
	echo 'NOTE: Organizr has been moved (AGAIN!) to /usr/share/webapps/organizr'
	echo '(read-only data) and /var/lib/organizr (read-write storage). An old installation'
	echo 'in /opt/organizr has been detected.  Use the following command to move your'
	echo 'configuration to the new location:'
	echo '  sudo mv /opt/organizr/api/config/config.php /var/lib/organizr/api/config'
	echo
	echo 'If you installed any custom tab images, move those with:'
	echo '  sudo mv /opt/organizr/plugins/images/tabs/* /var/lib/organizr/plugins/images/tabs'
	echo
	echo 'Please adjust the paths in your webserver and PHP configs to reflect the new'
	echo 'location in /usr/share/webapps/organizr.  You may also need to add /var/lib/organizr'
	echo 'to your PHP config.'
	echo '-------------------------------------------------------------------------------'
    elif [[ -e /usr/share/webapps/organizr/Organizr/api/config/config.php ]]; then
	echo '-------------------------------------------------------------------------------'
	echo 'NOTE: The Organizr config and plugins have been moved to /var/lib/organizr.'
	echo 'In addition, the remaining installation has moved from /usr/share/webapps/organizr/Organizr'
	echo 'to /usr/share/webapps/organizr.  An old installation in /usr/share/webapps/organizr/Organizr'
	echo 'has been detected.  Use the following command to move your configuration to the new location:'
	echo '  sudo mv /usr/share/webapps/organizr/Organizr/api/config/config.php /var/lib/organizr/api/config'
	echo
	echo 'If you installed any custom tab images, move those with:'
	echo '  sudo mv /usr/share/webapps/organizr/Organizr/plugins/images/tabs/* /var/lib/organizr/plugins/images/tabs'
	echo
	echo 'Please adjust the paths in your webserver and PHP configs to reflect the new'
	echo 'location in /usr/share/webapps/organizr.  You may also need to add /var/lib/organizr'
	echo 'to your PHP config.'
	echo '-------------------------------------------------------------------------------'
    fi
}