HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //var/lib/dpkg/info/shorewall.postinst
#!/bin/sh -e

. /usr/share/debconf/confmodule 


case "$1" in
    configure)
        db_reset shorewall/dont_restart || true
        db_reset shorewall/major_release || true
        db_go

        if [ ! -d /var/lib/shorewall ]
        then
            mkdir -p /var/lib/shorewall
        fi

        # The init script was moved from shorewall-common to shorewall, but
        # the shorewall-common postrm tries to remove the symlinks, which
        # cannot happen since /etc/init.d/shorewall now exists in the
        # shorewall package.
        if [ -f "/var/lib/dpkg/info/shorewall-common.postrm" ]
        then
            rm -f /var/lib/dpkg/info/shorewall-common.postrm
        fi

        restart="true"

        if [ -f "/etc/default/shorewall" ]
        then
            . /etc/default/shorewall
        fi

        if [ "$restart" = "true" ] && [ "$startup" = "1" ]
        then 
            if /sbin/shorewall check
            then
                if [ -d "/run/systemd/system" ] && [ -f "/lib/systemd/system/shorewall.service" ]
                then
                    deb-systemd-helper enable shorewall.service
                    deb-systemd-invoke restart shorewall.service
                elif [ -f "/etc/init.d/shorewall" ]
                then
                    if [ -x "/usr/sbin/invoke-rc.d" ]
                    then
                        invoke-rc.d shorewall restart
                    else
                        /etc/init.d/shorewall restart
                    fi
                fi
            else
                db_input critical shorewall/invalid_config || true
            fi
        fi
        ;;
    
    abort-upgrade|abort-remove|abort-deconfigure)
        ;;
        
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
        ;;
esac

# Automatically added by dh_installinit/12.5.4
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/shorewall" ]; then
		update-rc.d shorewall defaults >/dev/null || exit 1
	fi
fi
# End automatically added section