%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/lib/dpkg/info/
Upload File :
Create Path :
Current File : /var/lib/dpkg/info/speech-dispatcher.postinst

#!/bin/sh
set -e

USER_NAME=speech-dispatcher
HOME_DIR=/run/speech-dispatcher

if ! id -u $USER_NAME >/dev/null 2>&1; then
  adduser --quiet --system --ingroup audio \
          --home $HOME_DIR \
          --shell /bin/false --disabled-login  \
	  --gecos 'Speech Dispatcher' $USER_NAME
elif ! test -d $HOME_DIR; then
  if test -d /run/speechd; then
    mv /run/speechd $HOME_DIR
  else
    mkdir $HOME_DIR
  fi
  usermod --shell /bin/false $USER_NAME
fi

if [ -d /var/log/speech-dispatcher ]; then
  chown $USER_NAME /var/log/speech-dispatcher
fi

# Automatically added by dh_installtmpfiles/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "$(command -v systemd-tmpfiles)" ]; then
		systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create speech-dispatcher.conf || true
	fi
fi
# End automatically added section
# Automatically added by dh_installsystemduser/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -z "${DPKG_ROOT:-}" ] ; then
		# The following line should be removed in trixie or trixie+1
		deb-systemd-helper --user unmask 'speech-dispatcher.socket' >/dev/null || true

		# was-enabled defaults to true, so new installations run enable.
		if deb-systemd-helper --quiet --user was-enabled 'speech-dispatcher.socket' ; then
			# Enables the unit on first installation, creates new
			# symlinks on upgrades if the unit file has changed.
			deb-systemd-helper --user enable 'speech-dispatcher.socket' >/dev/null || true
		else
			# Update the statefile to add new symlinks (if any), which need to be
			# cleaned up on purge. Also remove old symlinks.
			deb-systemd-helper --user update-state 'speech-dispatcher.socket' >/dev/null || true
		fi
	fi
fi
# End automatically added section
# Automatically added by dh_installdeb/13.14.1ubuntu5
dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/mary-generic-disabled.conf 0.11.0\~ speech-dispatcher -- "$@"
dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/espeak-generic.conf 0.10.2-1\~ speech-dispatcher -- "$@"
dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/pico-generic.conf 0.10.2-1\~ speech-dispatcher -- "$@"
dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/ivona.conf 0.10.2-3\~ speech-dispatcher -- "$@"
# End automatically added section
# Automatically added by dh_installinit/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/speech-dispatcher" ]; then
		update-rc.d speech-dispatcher defaults-disabled >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if deb-systemd-helper debian-installed 'speech-dispatcherd.service'; then
		# The following line should be removed in trixie or trixie+1
		deb-systemd-helper unmask 'speech-dispatcherd.service' >/dev/null || true

		if deb-systemd-helper --quiet was-enabled 'speech-dispatcherd.service'; then
			# Create new symlinks, if any.
			deb-systemd-helper enable 'speech-dispatcherd.service' >/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 'speech-dispatcherd.service' >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.14.1ubuntu5
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -d /run/systemd/system ]; then
		systemctl --system daemon-reload >/dev/null || true
		if [ -n "$2" ]; then
			_dh_action=restart
		else
			_dh_action=start
		fi
		deb-systemd-invoke $_dh_action 'speech-dispatcherd.service' >/dev/null || true
	fi
fi
# End automatically added section


if [ -z "$(dpkg-query -f '${Version}' -W speech-dispatcher-baratinoo 2> /dev/null)" ]
then
	dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/baratinoo.conf 0.10.2-1\~ speech-dispatcher -- "$@"
fi

if [ -z "$(dpkg-query -f '${Version}' -W speech-dispatcher-ibmtts 2> /dev/null)" ]
then
	dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/ibmtts.conf 0.10.2-1\~ speech-dispatcher -- "$@"
fi

if [ -z "$(dpkg-query -f '${Version}' -W speech-dispatcher-kali 2> /dev/null)" ]
then
	dpkg-maintscript-helper rm_conffile /etc/speech-dispatcher/modules/kali.conf 0.10.2-1\~ speech-dispatcher -- "$@"
fi

Zerion Mini Shell 1.0