mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-11-12 03:55:00 -05:00
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
|
|
||
|
post_install() {
|
||
|
echo ""
|
||
|
echo "==> Installed in : /usr/share/webapps/wallabag"
|
||
|
echo ""
|
||
|
echo "==> Config is at /etc/webapps/wallabag/config/parameters.yml"
|
||
|
echo ""
|
||
|
echo -n "Change the configuration to fit to your current setup, and then "
|
||
|
echo "init wallabag by launching:"
|
||
|
echo "php /usr/share/webapps/wallabag/bin/console wallabag:install --env=prod"
|
||
|
echo ""
|
||
|
echo -n "To setup your webserver and enable the needed php extensions, "
|
||
|
echo "please read: http://doc.wallabag.org/en/master/user/installation.html"
|
||
|
echo ""
|
||
|
echo -n "If you upgraded from 2.0.x, you might need to check the upgrade guide: "
|
||
|
echo "http://doc.wallabag.org/en/master/user/upgrade-2.0.x-2.1.1.html"
|
||
|
}
|
||
|
|
||
|
|
||
|
pre_upgrade() {
|
||
|
# save old untracked config and make it tracked
|
||
|
if [[ -f /usr/share/webapps/wallabag/app/config/parameters.yml && \
|
||
|
! -h /usr/share/webapps/wallabag/app/config/parameters.yml ]];
|
||
|
then install -Dm644 \
|
||
|
/usr/share/webapps/wallabag/app/config/parameters.yml \
|
||
|
-t /etc/webapps/wallabag/
|
||
|
fi
|
||
|
# also move `data` and `var` to /var/lib/wallabag/
|
||
|
if [[ -d /usr/share/webapps/wallabag/data && \
|
||
|
! -h /usr/share/webapps/wallabag/data && \
|
||
|
-d /usr/share/webapps/wallabag/var && \
|
||
|
! -h /usr/share/webapps/wallabag/var ]]; then
|
||
|
install -d /var/lib/wallabag/
|
||
|
chown http:http /var/lib/wallabag/
|
||
|
mv /usr/share/webapps/wallabag/{data,var} /var/lib/wallabag/
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
post_upgrade() {
|
||
|
rm -rf /var/lib/wallabag/var/cache/*
|
||
|
}
|