diff --git a/ct/2fauth.sh b/ct/2fauth.sh index 64e6cae02..f3e730bbb 100644 --- a/ct/2fauth.sh +++ b/ct/2fauth.sh @@ -28,6 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if check_for_gh_release "2fauth" "Bubka/2FAuth"; then $STD apt update $STD apt -y upgrade diff --git a/ct/apache-guacamole.sh b/ct/apache-guacamole.sh index 9cf963830..187ff500c 100644 --- a/ct/apache-guacamole.sh +++ b/ct/apache-guacamole.sh @@ -20,15 +20,16 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/apache-guacamole ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_error "Currently we don't provide an update function for this ${APP}." + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/apache-guacamole ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + setup_mariadb + msg_error "Currently we don't provide an update function for this ${APP}." + exit } start diff --git a/ct/booklore.sh b/ct/booklore.sh index 8ea8cade9..9a30aa172 100644 --- a/ct/booklore.sh +++ b/ct/booklore.sh @@ -28,6 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if check_for_gh_release "booklore" "booklore-app/BookLore"; then msg_info "Stopping Service" systemctl stop booklore diff --git a/ct/bookstack.sh b/ct/bookstack.sh index 515a32ea5..e1ddd4afe 100644 --- a/ct/bookstack.sh +++ b/ct/bookstack.sh @@ -28,6 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if check_for_gh_release "bookstack" "BookStackApp/BookStack"; then msg_info "Stopping Apache2" systemctl stop apache2 diff --git a/ct/dolibarr.sh b/ct/dolibarr.sh index 15a4daa24..fa8ab75da 100644 --- a/ct/dolibarr.sh +++ b/ct/dolibarr.sh @@ -20,15 +20,16 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /usr/share/dolibarr ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_error "To update ${APP}, use the applications web interface." + header_info + check_container_storage + check_container_resources + if [[ ! -d /usr/share/dolibarr ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + setup_mariadb + msg_error "To update ${APP}, use the applications web interface." + exit } start @@ -38,4 +39,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/dolibarr/install${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/dolibarr/install${CL}" diff --git a/ct/domain-monitor.sh b/ct/domain-monitor.sh index da772433b..f5f9ab270 100644 --- a/ct/domain-monitor.sh +++ b/ct/domain-monitor.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if ! grep -Fq "root /usr/bin/php /opt/domain-monitor/cron/check_domains.php" /etc/crontab; then echo "0 0 * * * root /usr/bin/php /opt/domain-monitor/cron/check_domains.php" >>/etc/crontab diff --git a/ct/firefly.sh b/ct/firefly.sh index bf9bcbc4f..1b45666fe 100644 --- a/ct/firefly.sh +++ b/ct/firefly.sh @@ -28,7 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - + setup_mariadb if check_for_gh_release "firefly" "firefly-iii/firefly-iii"; then systemctl stop apache2 cp /opt/firefly/.env /opt/.env diff --git a/ct/ghost.sh b/ct/ghost.sh index e698661fc..7cc4c3086 100644 --- a/ct/ghost.sh +++ b/ct/ghost.sh @@ -23,6 +23,7 @@ function update_script() { header_info check_container_storage check_container_resources + setup_mariadb NODE_VERSION="22" setup_nodejs diff --git a/ct/glpi.sh b/ct/glpi.sh index f75dac17b..7db842856 100644 --- a/ct/glpi.sh +++ b/ct/glpi.sh @@ -28,6 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb RELEASE=$(curl -fsSL https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_error "Currently we don't provide an update function for this ${APP}." diff --git a/ct/hortusfox.sh b/ct/hortusfox.sh index 926629b0a..04cbc51dd 100644 --- a/ct/hortusfox.sh +++ b/ct/hortusfox.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if check_for_gh_release "hortusfox" "danielbrendel/hortusfox-web"; then msg_info "Stopping Service" systemctl stop apache2 diff --git a/ct/invoiceninja.sh b/ct/invoiceninja.sh index 01fa08d2c..d462165b9 100644 --- a/ct/invoiceninja.sh +++ b/ct/invoiceninja.sh @@ -28,7 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - + setup_mariadb if check_for_gh_release "invoiceninja" "invoiceninja/invoiceninja"; then msg_info "Stopping Services" systemctl stop supervisor nginx php8.4-fpm diff --git a/ct/itsm-ng.sh b/ct/itsm-ng.sh index d7e6dfbc4..179078020 100644 --- a/ct/itsm-ng.sh +++ b/ct/itsm-ng.sh @@ -28,6 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit 1 fi + setup_mariadb msg_info "Updating LXC" $STD apt update diff --git a/ct/kimai.sh b/ct/kimai.sh index 139650082..dcd24cca5 100644 --- a/ct/kimai.sh +++ b/ct/kimai.sh @@ -30,11 +30,12 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb PHP_VERSION="8.4" PHP_MODULE="mysql" PHP_APACHE="YES" setup_php setup_composer - if check_for_gh_release "kimai" "kimai/kimai"; then + if check_for_gh_release "kimai" "kimai/kimai"; then BACKUP_DIR="/opt/kimai_backup" msg_info "Stopping Apache2" diff --git a/ct/leantime.sh b/ct/leantime.sh index 51d7a9438..5a199d06e 100644 --- a/ct/leantime.sh +++ b/ct/leantime.sh @@ -28,7 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - + setup_mariadb if check_for_gh_release "leantime" "Leantime/leantime"; then msg_info "Creating Backup" mariadb-dump leantime >"/opt/${APP}_db_backup_$(date +%F).sql" diff --git a/ct/librenms.sh b/ct/librenms.sh index f45f4a813..0827002e5 100644 --- a/ct/librenms.sh +++ b/ct/librenms.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb msg_info "Updating LibreNMS" su librenms cd /opt/librenms diff --git a/ct/limesurvey.sh b/ct/limesurvey.sh index b51580225..c72618aba 100644 --- a/ct/limesurvey.sh +++ b/ct/limesurvey.sh @@ -20,16 +20,17 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/limesurvey ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - msg_warn "Application is updated via Web Interface" + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/limesurvey ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + setup_mariadb + + msg_warn "Application is updated via Web Interface" + exit } start diff --git a/ct/managemydamnlife.sh b/ct/managemydamnlife.sh index 66d49d2ff..163212009 100644 --- a/ct/managemydamnlife.sh +++ b/ct/managemydamnlife.sh @@ -28,6 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if check_for_gh_release "mmdl" "intri-in/manage-my-damn-life-nextjs"; then msg_info "Stopping service" systemctl stop mmdl diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 8b4fd335f..4d87d63b4 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -20,18 +20,19 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /etc/mysql/mariadb.conf.d ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating ${APP} LXC" - $STD apt update - $STD apt -y upgrade - msg_ok "Updated successfully!" + header_info + check_container_storage + check_container_resources + if [[ ! -d /etc/mysql/mariadb.conf.d ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + setup_mariadb + msg_info "Updating ${APP} LXC" + $STD apt update + $STD apt -y upgrade + msg_ok "Updated successfully!" + exit } start diff --git a/ct/miniflux.sh b/ct/miniflux.sh index a5f303422..82ecc888e 100644 --- a/ct/miniflux.sh +++ b/ct/miniflux.sh @@ -34,7 +34,7 @@ function update_script() { msg_ok "Service Stopped" fetch_and_deploy_gh_release "miniflux" "miniflux/v2" "binary" "latest" - + msg_info "Updating Miniflux" $STD miniflux -migrate -config-file /etc/miniflux.conf msg_ok "Updated Miniflux" diff --git a/ct/monica.sh b/ct/monica.sh index 42ce3fc50..d4fb98a53 100644 --- a/ct/monica.sh +++ b/ct/monica.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs diff --git a/ct/passbolt.sh b/ct/passbolt.sh index a2b94fa5f..9fb078729 100644 --- a/ct/passbolt.sh +++ b/ct/passbolt.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb msg_info "Updating $APP LXC" $STD apt update $STD apt upgrade -y diff --git a/ct/paymenter.sh b/ct/paymenter.sh index 0e701cae0..01bd77c64 100644 --- a/ct/paymenter.sh +++ b/ct/paymenter.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2) if [[ "$CURRENT_PHP" != "8.3" ]]; then diff --git a/ct/pelican-panel.sh b/ct/pelican-panel.sh index c1a62c87d..efa69f34b 100644 --- a/ct/pelican-panel.sh +++ b/ct/pelican-panel.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2) if [[ "$CURRENT_PHP" != "8.4" ]]; then diff --git a/ct/phpipam.sh b/ct/phpipam.sh index 6b61d4c98..464e726e2 100644 --- a/ct/phpipam.sh +++ b/ct/phpipam.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - + setup_mariadb if check_for_gh_release "phpipam" "phpipam/phpipam"; then msg_info "Stopping Service" systemctl stop apache2 diff --git a/ct/plant-it.sh b/ct/plant-it.sh index 4610fd41f..d29a5206e 100644 --- a/ct/plant-it.sh +++ b/ct/plant-it.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if check_for_gh_release "plant-it" "MDeLuise/plant-it"; then msg_info "Stopping Service" systemctl stop plant-it diff --git a/ct/projectsend.sh b/ct/projectsend.sh index 81435e41d..1f92c0662 100644 --- a/ct/projectsend.sh +++ b/ct/projectsend.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if check_for_gh_release "projectsend" "projectsend/projectsend"; then msg_info "Stopping Service" diff --git a/ct/pterodactyl-panel.sh b/ct/pterodactyl-panel.sh index 6f3e2f427..dd5f81c55 100644 --- a/ct/pterodactyl-panel.sh +++ b/ct/pterodactyl-panel.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2) if [[ "$CURRENT_PHP" != "8.4" ]]; then diff --git a/ct/shinobi.sh b/ct/shinobi.sh index 5ae9f34c7..1c63d26f3 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb msg_info "Updating Shinobi" cd /opt/Shinobi $STD sh UPDATE.sh diff --git a/ct/snipeit.sh b/ct/snipeit.sh index 471115f3b..17e8fb3ba 100644 --- a/ct/snipeit.sh +++ b/ct/snipeit.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb if ! grep -q "client_max_body_size[[:space:]]\+100M;" /etc/nginx/conf.d/snipeit.conf; then sed -i '/index index.php;/i \ client_max_body_size 100M;' /etc/nginx/conf.d/snipeit.conf fi diff --git a/ct/wallabag.sh b/ct/wallabag.sh index 836cd59f4..ab5ee2e28 100644 --- a/ct/wallabag.sh +++ b/ct/wallabag.sh @@ -28,7 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - + setup_mariadb if check_for_gh_release "wallabag" "wallabag/wallabag"; then msg_info "Stopping Services" systemctl stop nginx php8.3-fpm diff --git a/ct/wavelog.sh b/ct/wavelog.sh index 504014464..f29522b4b 100644 --- a/ct/wavelog.sh +++ b/ct/wavelog.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - + setup_mariadb if check_for_gh_release "wavelog" "wavelog/wavelog"; then msg_info "Stopping Services" systemctl stop apache2 diff --git a/ct/wordpress.sh b/ct/wordpress.sh index ee7208092..535c15eac 100644 --- a/ct/wordpress.sh +++ b/ct/wordpress.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + setup_mariadb msg_error "Wordpress should be updated via the user interface." exit }