#!/bin/sh

set -e

case $1 in
  configure)
    systemctl daemon-reload
    # not restarting cockpit here, it is socket-activated

    if [ -z "$2" ]; then
      /usr/lib/cockpit/cockpit-certificate-ensure
    fi

    systemctl restart cockpit.socket
    ;;
esac

#DEBHELPER#
