aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos/bareos.pre-upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'community/bareos/bareos.pre-upgrade')
-rwxr-xr-xcommunity/bareos/bareos.pre-upgrade38
1 files changed, 38 insertions, 0 deletions
diff --git a/community/bareos/bareos.pre-upgrade b/community/bareos/bareos.pre-upgrade
new file mode 100755
index 00000000000..a60ecced0fb
--- /dev/null
+++ b/community/bareos/bareos.pre-upgrade
@@ -0,0 +1,38 @@
+#!/bin/sh
+active_removed_backend=""
+
+if grep -qhriE "dbdriver.*=.*mysql" /etc/bareos/; then
+ active_removed_backend="MySQL"
+fi
+if grep -qhriE "dbdriver.*=.*sqlite" /etc/bareos/; then
+ active_removed_backend="$active_removed_backend SQLite"
+fi
+
+echo "You are currently using bareos with the $active_removed_backend" >&2
+echo "catalog backend." >&2
+echo "" >&2
+echo "THIS IS NOT SUPPORTED ANYMORE" >&2
+echo "" >&2
+echo "Beginning with version 21.0.0 bareos has dropped support for" >&2
+echo "MySQL and SQLite catalog backends." >&2
+echo "" >&2
+echo "To upgrade to bareos >=21.0.0 you need to migrate to PostgreSQL" >&2
+echo "catalog backend using the 'bareos-dbcopy' tool of your current" >&2
+echo "installation first." >&2
+echo "" >&2
+echo "current catalog backend not supported anymore" >&2
+
+if $(apk info -qe bareos-webui); then
+ for _ver in 81 82; do
+ apk info -qe php$_ver-apache2 && \
+ echo "!! Found php$_ver-apache2. This needs to be removed since apache2 " && \
+ echo "!! with mod_php is no longer supported" && \
+ echo "" && \
+ echo "!! You should install php-fpm with:" && \
+ echo "" && \
+ echo "!! apk add php-fpm" && \
+ echo "" >&2
+ done
+fi
+
+exit 0