Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 18.191.240.171
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/cwd/proc/2/cwd/var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/cwd/proc/2/cwd/var/lib/dpkg/info/sasl2-bin.postinst
#!/bin/sh
# postinst script for sasl2-bin
# Copyright (c) 2006 Fabian Fagerholm
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

set -e

FALLBACK_RUN_DIR=/var/run/saslauthd
SASLDB_FILE=/etc/sasldb2

# Debconf hook.
. /usr/share/debconf/confmodule

case "$1" in
	configure)
		# Upgrade SASL database if needed
		# The libdb dependency was updated in the following versions:
		#  2.1.22.dfsg1-14 (db4.2 -> db4.4)
		#  2.1.22.dfsg1-17 (db4.4 -> db4.6)
		#  2.1.22.dfsg1-24 (db4.6 -> db4.7)
		#  2.1.23.dfsg1-4 (db4.7 -> db4.8)
		#  2.1.23.dfsg1-8 (db4.8 -> db5.1)

		if [ -r /usr/lib/sasl2/berkeley_db.active ]; then
			OLD_BDB=$(cat /usr/lib/sasl2/berkeley_db.active)
		else
			if dpkg --compare-versions "$2" "lt-nl" 2.1.23.dfsg1-4; then
				OLD_BDB=4.7
			elif dpkg --compare-versions "$2" "lt-nl" 2.1.23.dfsg1-9; then
				OLD_BDB=4.8
			fi
		fi
		
		# Read the compiled-in Berkeley DB version
		NEW_BDB=$(cat /usr/lib/sasl2/berkeley_db.txt)

		if [ "$OLD_BDB" != "$NEW_BDB" ]; then
			if [ -e $SASLDB_FILE ]; then
				# The database exists and has users, begin upgrade procedure
				#
				# Well, this code doesn't break anything, but since Cyrus SASL
				# doesn't use transactional environment and the database format
				# was not changed since db3 it also doesn't do anything at all

				# Make backup and handle errors
				db_get cyrus-sasl2/backup-sasldb2
				if ! cp --archive $SASLDB_FILE "$RET" >/dev/null 2>&1; then
					db_input high cyrus-sasl2/upgrade-sasldb2-backup-failed || true
					db_go || true
					exit 1
				fi

				# Upgrade SASL database and handle errors
				if ! db${NEW_BDB}_upgrade $SASLDB_FILE >/dev/null 2>&1; then
					db_input high cyrus-sasl2/upgrade-sasldb2-failed || true
					db_go || true
					cp --archive "$RET" $SASLDB_FILE >/dev/null 2>&1
					exit 1
				fi
			fi

			# Note the active Berkeley DB version
			cp -f /usr/lib/sasl2/berkeley_db.txt /usr/lib/sasl2/berkeley_db.active
		fi

		# Create a statoverride for the default saslauthd run directory,
		# unless one already exists
		if ! dpkg-statoverride --list $FALLBACK_RUN_DIR >/dev/null 2>&1; then
			install -d --owner="root" --group="sasl" --mode="710" \
				$FALLBACK_RUN_DIR
			dpkg-statoverride --update --add root sasl 710 $FALLBACK_RUN_DIR
		fi

		# Create an empty sasldb file, unless one already exists
		if [ ! -e $SASLDB_FILE ]; then
			echo '!' | saslpasswd2 -c 'no:such:user'
			saslpasswd2 -d 'no:such:user'
		fi

		# Create a statoverride for the sasldb file, unless one already exists
		if ! dpkg-statoverride --list $SASLDB_FILE >/dev/null 2>&1; then
			dpkg-statoverride --update --add root sasl 660 $SASLDB_FILE
		fi

		# In 2.1.23.dfsg1-4 and later versions, saslauthd is no longer
		# explicitly stopped on shutdown and reboot.
		if dpkg --compare-versions "$2" lt "2.1.23.dfsg1-4"; then
			rm -f /etc/rc0.d/K20saslauthd /etc/rc6.d/K20saslauthd
		fi

		db_stop

		;;

	abort-upgrade|abort-remove|abort-deconfigure)
		;;

	*)
		echo "postinst called with unknown argument $1" >&2
		exit 0
		;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installinit/13.11.1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -z "${DPKG_ROOT:-}" ] && [ -x "/etc/init.d/saslauthd" ]; then
		update-rc.d saslauthd defaults-disabled >/dev/null
		if [ -n "$2" ]; then
			_dh_action=restart
		else
			_dh_action=start
		fi
		invoke-rc.d --skip-systemd-native saslauthd $_dh_action || exit 1
	fi
fi
# End automatically added section


exit 0

Anon7 - 2022
AnonSec Team