8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00
firebird-mirror/builds/install/arch-specific/sinixz/postinstall.in
2003-07-08 22:59:57 +00:00

66 lines
2.4 KiB
Bash

#!/bin/sh
#
# $Header: /home/job/firebird/cvs-backup/firebird2/builds/install/arch-specific/sinixz/postinstall.in,v 1.1 2003-07-08 22:58:56 brodsom Exp $
#------------------------------------------------------------------------------
# $Copyright:
# Copyright (C) Siemens Nixdorf Informationssysteme AG 1994 - 1998
# Copyright (C) Siemens AG 1998 1999
# Copyright (C) Fujitsu Siemens Computers GmbH 1999 - 2002
# All rights reserved
# $
#------------------------------------------------------------------------------
FIREBIRD=@prefix@
cd $FIREBIRD
# Create lock files
HOSTNAME=`uname -n`
for i in isc_init1 isc_lock1 isc_event1
do
file=${i}.${HOSTNAME}
touch ${file}
chmod 666 ${file}
done
# Create log
touch firebird.log
chmod 666 firebird.log
#
# If TCP is installed, update both services and servers databases
#
if [ -f /etc/services ]; then
grep -s @FB_SERVICE_NAME@ /etc/services >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Patching /etc/services..."
echo "@FB_SERVICE_NAME@ @FB_SERVICE_PORT@/tcp # InterBase Database Remote Protocol" >>/etc/services
fi
fi
if [ -f /etc/inetd.conf ]; then
grep -s @FB_SERVICE_NAME@ /etc/inetd.conf >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Patching /etc/inetd.conf..."
echo "" >> /etc/inetd.conf
echo "# InterBase Database Remote Server" >> /etc/inetd.conf
echo "@FB_SERVICE_NAME@ stream tcp nowait.30000 root $FIREBIRD/bin/fb_inet_server fb_inet_server" >>/etc/inetd.conf
echo "Restarting inetd..."
kill -HUP `ps -e | grep inetd | awk '{print $1}'`
fi
fi
if [ -f /etc/profile ]; then
grep -s "# Enhance PATH for Firebird2" /etc/profile >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Patching /etc/profile..."
echo "# Enhance PATH for Firebird2" >>/etc/profile
echo "PATH=\$PATH:$FIREBIRD/bin" >>/etc/profile
echo "export PATH" >>/etc/profile
echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$FIREBIRD/lib" >>/etc/profile
echo "export LD_LIBRARY_PATH" >>/etc/profile
echo "INTERBASE=$FIREBIRD" >>/etc/profile
echo "export INTERBASE" >>/etc/profile
fi
fi
# EOF