blob: 707c440ffbafc7c4408d740b6a19bd4e79262e09 (
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
|
# Maintainer: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org>
post_install() {
if [[ ! -f /var/lib/baikal/db/db.sqlite ]]; then
# Create initial database if it doesn't exist.
# Note we can't do this while packaging because we don't want to override
# an older database.
mkdir /var/lib/baikal/db
cp /usr/share/webapps/baikal/Core/Resources/Db/SQLite/db.sqlite \
/var/lib/baikal/db
chown -R http:http /var/lib/baikal/db
fi
# Now create install file
touch /var/lib/baikal/ENABLE_INSTALL
echo "Please add /var/lib/baikal to open_basedir in your /etc/php.ini."
echo
echo "You also need to set up your webserver for baikal, there are example"
echo "configs for Apache/nginx at http://sabre.io/baikal/install/."
echo
echo "After that, navigate to your baikal instance to complete the setup."
echo
echo "Note: If you complete the setup more in than an hour, you'll need to"
echo "execute this manually so baikal allows you to install:"
echo " touch /var/lib/baikal/ENABLE_INSTALL"
}
post_upgrade() {
if [[ $(vercmp $2 '0.2.7-5') == -1 ]]; then
echo "Please add /var/lib/baikal to open_basedir in your /etc/php.ini."
fi
if [[ $(vercmp $2 0.3.0) == -1 ]]; then
touch /var/lib/baikal/ENABLE_INSTALL
echo "Navigate to your baikal instance to complete the upgrade."
fi
}
# vim:set ts=2 sw=2 et ft=sh:
|