2016-05-07 00:53:32 +02:00
|
|
|
|
2014-02-17 13:40:23 +01:00
|
|
|
post_install() {
|
2016-10-19 15:35:20 +02:00
|
|
|
echo ""
|
|
|
|
echo "==> Installed in : /usr/share/webapps/wallabag"
|
|
|
|
echo ""
|
2018-10-04 10:47:48 +02:00
|
|
|
echo "==> Config is at /etc/webapps/wallabag/parameters.yml"
|
2016-10-19 15:35:20 +02:00
|
|
|
echo ""
|
2016-05-07 00:53:32 +02:00
|
|
|
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, "
|
2019-02-18 14:25:20 +01:00
|
|
|
echo "please read: https://doc.wallabag.org/en/master/user/installation.html"
|
2016-05-07 00:53:32 +02:00
|
|
|
}
|
2014-02-17 13:40:23 +01:00
|
|
|
|
2016-05-07 00:53:32 +02:00
|
|
|
|
|
|
|
pre_upgrade() {
|
2016-10-19 15:35:20 +02:00
|
|
|
# save old untracked config and make it tracked
|
|
|
|
if [[ -f /usr/share/webapps/wallabag/app/config/parameters.yml && \
|
2016-05-07 00:53:32 +02:00
|
|
|
! -h /usr/share/webapps/wallabag/app/config/parameters.yml ]];
|
|
|
|
then install -Dm644 \
|
|
|
|
/usr/share/webapps/wallabag/app/config/parameters.yml \
|
|
|
|
-t /etc/webapps/wallabag/
|
2016-10-19 15:35:20 +02:00
|
|
|
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
|
2014-02-17 13:40:23 +01:00
|
|
|
}
|
|
|
|
|
2014-02-19 16:33:35 +01:00
|
|
|
post_upgrade() {
|
2016-10-19 15:35:20 +02:00
|
|
|
rm -rf /var/lib/wallabag/var/cache/*
|
2018-01-20 14:29:18 +01:00
|
|
|
echo ""
|
2020-12-11 09:53:50 +01:00
|
|
|
echo "====================================================================================================="
|
|
|
|
echo " You need to execute any database migration with: "
|
|
|
|
echo "cd /usr/share/webapps/wallabag && sudo -u http php bin/console --env=prod doctrine:migrations:migrate"
|
|
|
|
echo " "
|
|
|
|
echo " Check the release notes for any other step: https://github.com/wallabag/wallabag/releases "
|
|
|
|
echo "====================================================================================================="
|
2018-01-20 14:29:18 +01:00
|
|
|
echo ""
|
2014-02-19 16:33:35 +01:00
|
|
|
}
|