#! /bin/sh # postinst script for csync2 # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # case "$1" in configure) if test -x /usr/sbin/update-inetd && \ ! grep -q -s "^csync2" /etc/inetd.conf then update-inetd --remove '^csync2' update-inetd --group OTHER --add \ 'csync2\t\tstream\ttcp\tnowait\troot\t/usr/sbin/csync2\tcsync2 -i -l' fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installinit/13.24.2 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -x "/etc/init.d/csync2" ]; then update-rc.d csync2 defaults-disabled >/dev/null || exit 1 fi fi # End automatically added section # Automatically added by dh_installsystemd/13.24.2 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if deb-systemd-helper debian-installed 'csync2.socket'; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper unmask 'csync2.socket' >/dev/null || true if deb-systemd-helper --quiet was-enabled 'csync2.socket'; then # Create new symlinks, if any. deb-systemd-helper enable 'csync2.socket' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper update-state 'csync2.socket' >/dev/null || true fi # End automatically added section exit 0