⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install

📁 firebird源代码
💻
字号:
#!/bin/shFB_FW='/Library/Frameworks/Firebird.framework'# Install and start sysv semaphoresif [ -e "SysV Semaphores" ]; then	mkdir -p /Library/StartupItems	if [ ! -e "/Library/StartupItems/SysV Semaphores" ]; then		cp -r "SysV Semaphores" /Library/StartupItems		"/Library/StartupItems/SysV Semaphores/SysV Semaphores" start	fifi# Setup our services entry, our user account, and our group### Start with the service entryif niutil -list . /services/gds_db 2&>1 /dev/null ; thenelse	niutil -create . /services/gds_db	niutil -createprop . /services/gds_db port 3050	niutil -createprop . /services/gds_db protocol tcp tcpfi# Now for the group.  If the firebird group already exists, remember the#  id if we need it to create the firebird userif niutil -list . /groups/firebird 2&>1 /dev/null; then	NEW_GID=`niutil -readprop . /groups/firebird gid`else	NEW_GID=`nigrep gid . /groups | grep ":  gid " | awk '{ print $4 + 1 } ' | sort -n | tail -1`	niutil -create . /groups/firebird	niutil -createprop . /groups/firebird passwd "*"	niutil -createprop . /groups/firebird gid $NEW_GID	niutil -createprop . /groups/firebird users firebirdfi# Now create the firebird userif niutil -list . /users/firebird 2&>1 /dev/null; thenelse	NEW_UID=`nigrep uid . /users | grep ":  uid " | awk '{ print $4 + 1 } ' | sort -n | tail -1`	niutil -create . /users/firebird	niutil -createprop . /users/firebird uid $NEW_UID	niutil -createprop . /users/firebird home /Library/Frameworks/Firebird.framework	niutil -createprop . /users/firebird passwd "*"	niutil -createprop . /users/firebird expire 0	niutil -createprop . /users/firebird shell /bin/tcsh	niutil -createprop . /users/firebird change 0	niutil -createprop . /users/firebird gid $NEW_GID	niutil -createprop . /users/firebird realname "Firebird SQL Database"fi# set the permissions correctlyif [ -f Firebird.framework/Versions/A/Resources/.SuperServer ]; thenelse	rm -rf /Library/StartupItems/Firebirdfi# Install the frameworkmkdir -p /Library/Frameworkscp -r Firebird.framework $FB_FWln -s ../../bin $FB_FW/Versions/A/Resources/English.lproj/var/bin; \ln -s Versions/Current/Headers $FB_FW/Headersln -s Versions/Current/Resources $FB_FW/Resourcesln -s Versions/Current/Firebird $FB_FW/Firebirdln -s A $FB_FW/Versions/Currentchown -R firebird.firebird $FB_FW# set the permissions correctlyif [ -f Firebird.framework/Versions/A/Resources/.SuperServer ]; thenelse    chmod 777 $FB_FW/Resources/English.lproj/var    chmod 777 $FB_FW/Resources/English.lproj/var/isc4.gdb    chmod 777 $FB_FW/Resources/English.lproj/var/help/help.gdb    #chmod a+s $FB_FW/Resources/bin/gds_drop    chmod a+s $FB_FW/Resources/bin/gds_lock_mgr    chmod a+s $FB_FW/Resources/bin/gds_inet_server    #chown root $FB_FW/Resources/bin/gds_drop    chown root $FB_FW/Resources/bin/gds_lock_mgr    chown root $FB_FW/Resources/bin/gds_inet_serverfi# Install the startup itemif [ -f Firebird.framework/Versions/A/Resources/.SuperServer ]; then	if [ -e Firebird.startup ]; then		mkdir -p /Library/StartupItems		cp -r Firebird.startup /Library/StartupItems/Firebird	fielse	rm -rf /Library/StartupItems/Firebirdfi# Install FBConsoleif [ -e FBConsole.app ]; then	mkdir -p /Applications	cp -r FBConsole.app /Applicationsfi## If TCP is installed, update both services and servers databases#HUPNEEDED='n'	# Relevant to Classic onlyif [ -f /etc/services ]; then    grep -s gds_db /etc/services  > /dev/null 2>&1    if test $? != 0 ; then	HUPNEEDED='y'        cat /etc/services /Library/Frameworks/Firebird.framework/Resources/English.lproj/var/services.isc > /etc/.interbase.temp.install.services	mv /etc/.interbase.temp.install.services /etc/services    fifiif [ -f /etc/inetd.conf ]; then    if [ -f Firebird.framework/Versions/A/Resources/.SuperServer ]; then	# Remove gds_db service. We do not want gds_inet_server to be invoked        echo "Installing Firebird SuperServer"	cat /etc/inetd.conf | grep -v gds_db > /etc/.interbase.temp.install.inetd.conf	mv /etc/.interbase.temp.install.inetd.conf /etc/inetd.conf	HUPNEEDED='y'    else	grep -s gds_db /etc/inetd.conf  > /dev/null 2>&1	if test $? != 0 ; then	    HUPNEEDED='y'	    cat /etc/inetd.conf inetd.conf.isc > /etc/.interbase.temp.install.inetd.conf	    mv /etc/.interbase.temp.install.inetd.conf /etc/inetd.conf	fi    fifiif grep -x "localhost" /etc/hosts.equiv > /dev/null; then                else         echo "localhost" >> /etc/hosts.equiv                fi    if grep -x "localhost.localdomain" /etc/hosts.equiv > /dev/null; then    else         echo "localhost.localdomain" >> /etc/hosts.equiv    fi    if [ "$HUPNEEDED" = 'y' ]then    INETPID=`ps -axe | grep inetd | awk '{print $1}'`    kill -HUP $INETPIDfi#### And last but not least, start the serverif [ -f Firebird.framework/Versions/A/Resources/.SuperServer ]; then	#echo Starting Firebird Database Server	Firebird.startup/Firebird startfi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -