#!/bin/sh
# post install script for the Debian GNU/Linux xtell package

set -e

#update-inetd --file /etc/services --add 'xtell		4224/tcp			# xtell server'
#update-inetd --add 'xtell		stream	tcp	nowait	nobody	/usr/sbin/tcpd	/usr/sbin/xtelld'

chown root.tty /usr/sbin/xtelld
chmod g+s /usr/sbin/xtelld

# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
	if [ -d /usr/doc -a ! -e /usr/doc/xtell -a -d /usr/share/doc/xtell ]; then
		ln -sf ../share/doc/xtell /usr/doc/xtell
	fi
fi

if [ "$1" = "configure" ]; then
	if [ ! -e /usr/bin/write ]; then
		ln -sf xtell /usr/bin/write
	fi
	if [ ! -e /usr/man/man1/write.1.gz ]; then
		ln -sf /usr/share/man/man1/xtell.1.gz /usr/man/man1/write.1.gz   
	fi
fi


# End automatically added section
# Automatically added by dh_installinit
update-rc.d xtell defaults >/dev/null
/etc/init.d/xtell start
# End automatically added section
