#!/bin/sh -e if [ "$1" = "configure" ]; then if ! getent group zorp >/dev/null 2>&1; then addgroup --quiet --system zorp fi if ! id zorp >/dev/null 2>&1; then adduser --quiet --system --no-create-home --ingroup zorp --home /var/lib/zorp zorp fi chown root:zorp /etc/zorp chown root:zorp /etc/zorp/* chmod 0750 /etc/zorp if [ ! -d /var/lib/zorp/keybridge-cache ]; then mkdir -p /var/lib/zorp/keybridge-cache fi chown zorp:zorp /var/lib/zorp/keybridge-cache chmod 0770 /var/lib/zorp/keybridge-cache ZORP_DHFILE="/etc/zorp/dh.pem" if [ ! -f $ZORP_DHFILE ]; then echo "Generating dh.pem for ephemeral Diiffie-Hellman connections" openssl dhparam -out $ZORP_DHFILE 2048 fi fi # Automatically added by dh_python2: if which pycompile >/dev/null 2>&1; then pycompile -p zorp fi # End automatically added section # Automatically added by dh_installinit/12.7.1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -x "/etc/init.d/zorp" ]; then update-rc.d zorp defaults >/dev/null if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi invoke-rc.d zorp $_dh_action || exit 1 fi fi # End automatically added section