#!/bin/sh # $Id: postinst,v 1.7 2003/09/08 18:09:03 agx Exp $ set -e VARDIR="/var/lib/portsentry" # Source debconf library. . /usr/share/debconf/confmodule get_services() { services= if [ -n "$TCP_MODE" ]; then services="portsentry@$TCP_MODE.service" fi if [ -n "$UDP_MODE" ]; then services="$services portsentry@$UDP_MODE.service" fi } PS_DEFAULT="/etc/default/portsentry" if [ "$1" = "configure" ] && ! [ -e "$PS_DEFAULT" ]; then # create /e/d/portsentry if it doesn't exist on first time installs TCP_MODE=tcp UDP_MODE=udp get_services cat >$PS_DEFAULT </dev/null if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi invoke-rc.d --skip-systemd-native portsentry $_dh_action || exit 1 fi fi # End automatically added section