2025-10-01 11:23:44 +02:00
|
|
|
#!/bin/bash
|
2025-10-01 11:32:35 +02:00
|
|
|
|
|
|
|
|
# Uhhhhhhhhhhhh
|
|
|
|
|
PHP_VERSION=$(dpkg -l | grep -Pe 'php[0-9.]+-fpm' | awk '{print $2}' | sed 's/php//;s/-fpm//')
|
|
|
|
|
PHP_VERSION=${PHP_VERSION-8.3}
|
|
|
|
|
|
2025-10-01 11:23:44 +02:00
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
# Pre-removal script for zabbix-php-monitoring
|
|
|
|
|
|
|
|
|
|
echo "Removing zabbix-php-monitoring..."
|
|
|
|
|
|
|
|
|
|
# Restart PHP-FPM to clear the auto_prepend_file configuration
|
2025-10-01 11:32:35 +02:00
|
|
|
systemctl reload php$PHP_VERSION-fpm.service || true
|
2025-10-01 11:23:44 +02:00
|
|
|
|
|
|
|
|
# Note: We don't remove the log files as they may contain important data
|
|
|
|
|
echo "Log files in /var/log/zabbix/ have been preserved"
|
|
|
|
|
echo "Configuration files will be removed"
|
|
|
|
|
|
2025-10-01 11:32:35 +02:00
|
|
|
exit 0
|