diff --git a/qbittorrent/rootfs/usr/local/sbin/ip6tables-restore b/qbittorrent/rootfs/usr/local/sbin/ip6tables-restore index 9071cb34a..23bff73d3 100644 --- a/qbittorrent/rootfs/usr/local/sbin/ip6tables-restore +++ b/qbittorrent/rootfs/usr/local/sbin/ip6tables-restore @@ -7,8 +7,10 @@ if [[ ! -x "${REAL_IP6TABLES_RESTORE}" ]]; then fi cleanup() { + local exit_code=$? [[ -n "${RULES_FILE:-}" && -f "${RULES_FILE}" ]] && rm -f "${RULES_FILE}" [[ -n "${SANITIZED_FILE:-}" && -f "${SANITIZED_FILE}" ]] && rm -f "${SANITIZED_FILE}" + return $exit_code } trap cleanup EXIT diff --git a/qbittorrent/rootfs/usr/local/sbin/iptables-restore b/qbittorrent/rootfs/usr/local/sbin/iptables-restore index bbe11f8f0..2219b563c 100644 --- a/qbittorrent/rootfs/usr/local/sbin/iptables-restore +++ b/qbittorrent/rootfs/usr/local/sbin/iptables-restore @@ -7,8 +7,10 @@ if [[ ! -x "${REAL_IPTABLES_RESTORE}" ]]; then fi cleanup() { + local exit_code=$? [[ -n "${RULES_FILE:-}" && -f "${RULES_FILE}" ]] && rm -f "${RULES_FILE}" [[ -n "${SANITIZED_FILE:-}" && -f "${SANITIZED_FILE}" ]] && rm -f "${SANITIZED_FILE}" + return $exit_code } trap cleanup EXIT