aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/skype/client.sh
blob: 7d7689a8031cda500b66670abbee6af9ed63d1f3 (plain)
1
openssl s_client -host localhost -port 2727 -verify 0
n */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

case "$1" in
  configure)
        PREV_VER=$2
        ;;
  abort-upgrade|abort-remove|abort-deconfigure)
        exit 0
        ;;
esac

# Read the package default, need to match the code in sitesummary-client
[ -f /usr/share/sitesummary/sitesummary-client.conf ] && \
  . /usr/share/sitesummary/sitesummary-client.conf
for confdir in \
    /usr/share/sitesummary/config.d \
    /etc/sitesummary/config.d
do
    [ -d $confdir ] || continue
    for config in $confdir/* ; do
	[ -f $config ] && . $config
    done
done

db_get sitesummary-client/collector_url
URL="$RET"

# Only update the URLs if it is different from the current value
if [ "$URL" != "$serverurls" ] ; then
    if [ -f /etc/sitesummary/config.d/00debconf ] ; then
	if grep -q '^serverurls=' /etc/sitesummary/config.d/00debconf ; then
	    sed "s%^serverurls=.*\$%serverurls=\"$URL\"%" < /etc/sitesummary/config.d/00debconf > /etc/sitesummary/config.d/00debconf.new && mv /etc/sitesummary/config.d/00debconf.new /etc/sitesummary/config.d/00debconf
	else
	    echo "serverurls=\"$URL\"/" >> /etc/sitesummary/config.d/00debconf
	fi
    else
	mkdir -p /etc/sitesummary/config.d
	echo "serverurls=\"$URL\"" > /etc/sitesummary/config.d/00debconf
    fi
fi

db_get sitesummary-client/site
SITE="$RET"
# Only replace the site file if the content changed
if [ -f /etc/sitesummary/site ] ; then
    OLDSITE="`cat /etc/sitesummary/site`"
    if [ "$SITE" != "$OLDSITE" ] ; then
	echo "$SITE" > /etc/sitesummary/site
    fi
else
    echo "$SITE" > /etc/sitesummary/site
fi

db_get sitesummary-client/sitegroup
SITEGROUP="$RET"
# Only replace the sitegroup file if the content changed
if [ -f /etc/sitesummary/sitegroup ] ; then
    OLDSITEGROUP="`cat /etc/sitesummary/sitegroup`"
    if [ "$SITEGROUP" != "$OLDSITEGROUP" ] ; then
	echo "$SITEGROUP" > /etc/sitesummary/sitegroup
    fi
else
    echo "$SITEGROUP" > /etc/sitesummary/sitegroup
fi

db_get sitesummary-client/hostclass
HOSTCLASS="$RET"
# Only replace the hostclass file if the content changed
if [ -f /etc/sitesummary/hostclass ] ; then
    OLDHOSTCLASS="`cat /etc/sitesummary/hostclass`"
    if [ "$HOSTCLASS" != "$OLDHOSTCLASS" ] ; then
	echo "$HOSTCLASS" > /etc/sitesummary/hostclass
    fi
else
    echo "$HOSTCLASS" > /etc/sitesummary/hostclass
fi

config=/etc/nagios/nrpe.d/sitesummary-nrpe.cfg
if [ ! -f $config ] ; then
    db_get sitesummary-client/enable-nagios-nrpe-config
    if [ true = "$RET" ] ; then
	mkdir -p $(dirname $config)
	cat > $config <<EOF
dont_blame_nrpe=1
include=/etc/nagios/sitesummary-nrpe-commands.cfg
EOF
	db_get sitesummary-client/nagios-server
	if [ "$RET" ] ; then
	    echo "allowed_hosts=$RET" >> $config
	fi
    fi
fi

db_stop

# Switched from cron.d to cron.daily script in version 0.0.12
if dpkg --compare-versions "$PREV_VER" lt "0.0.12" && \
   [ -f /etc/cron.d/sitesummary-client ] 
then
    rm -f /etc/cron.d/sitesummary-client
fi

#DEBHELPER#