mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 03:26:17 +00:00
Update uninstall-tools.sh
This commit is contained in:
@@ -351,7 +351,8 @@ EOF
|
|||||||
uninstall_logrotate() {
|
uninstall_logrotate() {
|
||||||
msg_info "$(translate "Restoring original logrotate configuration...")"
|
msg_info "$(translate "Restoring original logrotate configuration...")"
|
||||||
|
|
||||||
# Restore from backup if it exists
|
[ -f /etc/logrotate.d/pveproxy ] && rm -f /etc/logrotate.d/pveproxy
|
||||||
|
|
||||||
if [ -f /etc/logrotate.conf.bak ]; then
|
if [ -f /etc/logrotate.conf.bak ]; then
|
||||||
mv /etc/logrotate.conf.bak /etc/logrotate.conf
|
mv /etc/logrotate.conf.bak /etc/logrotate.conf
|
||||||
systemctl restart logrotate >/dev/null 2>&1
|
systemctl restart logrotate >/dev/null 2>&1
|
||||||
@@ -469,20 +470,24 @@ uninstall_apt_ipv4() {
|
|||||||
uninstall_network_optimization() {
|
uninstall_network_optimization() {
|
||||||
msg_info "$(translate "Removing network optimizations...")"
|
msg_info "$(translate "Removing network optimizations...")"
|
||||||
|
|
||||||
# Remove ProxMenux network configuration
|
|
||||||
rm -f /etc/sysctl.d/99-network.conf
|
rm -f /etc/sysctl.d/99-network.conf
|
||||||
|
|
||||||
# Remove interfaces.d source line if we added it
|
|
||||||
local interfaces_file="/etc/network/interfaces"
|
local interfaces_file="/etc/network/interfaces"
|
||||||
if [ -f "$interfaces_file" ]; then
|
if [ -f "$interfaces_file" ]; then
|
||||||
# Only remove if it's the last line and looks like our addition
|
|
||||||
if tail -1 "$interfaces_file" | grep -q "^source /etc/network/interfaces.d/\*$"; then
|
if tail -1 "$interfaces_file" | grep -q "^source /etc/network/interfaces.d/\*$"; then
|
||||||
sed -i '$d' "$interfaces_file"
|
sed -i '$d' "$interfaces_file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reload sysctl
|
rm -f /etc/sysctl.d/97-proxmenux-fwbr.conf \
|
||||||
sysctl --system >/dev/null 2>&1
|
/etc/sysctl.d/98-proxmenux-rpf.conf
|
||||||
|
|
||||||
|
systemctl disable --now proxmenux-fwbr-tune.service >/dev/null 2>&1 || true
|
||||||
|
rm -f /etc/systemd/system/proxmenux-fwbr-tune.service
|
||||||
|
|
||||||
|
systemctl daemon-reload >/dev/null 2>&1 || true
|
||||||
|
sysctl --system >/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
|
||||||
msg_ok "$(translate "Network optimizations removed")"
|
msg_ok "$(translate "Network optimizations removed")"
|
||||||
register_tool "network_optimization" false
|
register_tool "network_optimization" false
|
||||||
|
|||||||
Reference in New Issue
Block a user