8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 08:03:04 +01:00

StartupItems is now deprecated on Yosemite (10.10), use launchctl for SuperServer as well as Classic

This commit is contained in:
paulbeach 2015-03-06 08:55:53 +00:00
parent bc4a49375a
commit 56bf1667f8
3 changed files with 54 additions and 3 deletions

View File

@ -14,9 +14,14 @@
# 10.3 Panther (xinetd)
# 10.4 Tiger - Uses Launchd (xinetd for backward compatibility)
# 10.5 Leopard - Uses Launchd (No xinetd) (no ni* commands)
# 10.6 Snow Leopard
# 10.7 Lion
# 10.8 Mountain Lion
# 10.9 Mavericks - Clang not gcc
# 10.10 Yosemite - No longer uses StartupItems
OSVERSION=`sw_vers -productVersion | awk -F '.' '{print $2}'`
echo $OSVERSION
echo "OSVersion =" $OSVERSION
FB_FW="/Library/Frameworks/Firebird.framework"
FB_RES="$FB_FW/Versions/A/Resources"
@ -213,8 +218,22 @@ fi
# launchd
echo "Test launchd"
if [ -f "$FB_FW/Versions/A/Resources/.SuperServer" ]; then
echo -n
else
if test $OSVERSION -lt 10
then
echo -n
fi
fi
if [ -f "$FB_FW/Versions/A/Resources/.SuperServer" ]; then
if test $OSVERSION -gt 9
then
echo "Yosemite and launchctl"
cp $FB_FW/Resources/org.firebird.gds.plist /Library/LaunchDaemons/org.firebird.gds.plist
launchctl load /Library/LaunchDaemons/org.firebird.gds.plist
fi
fi
if [ ! -f "$FB_FW/Versions/A/Resources/.SuperServer" ]; then
cp $FB_FW/Resources/org.firebird.gds.plist /Library/LaunchDaemons/org.firebird.gds.plist
launchctl load /Library/LaunchDaemons/org.firebird.gds.plist
fi
@ -279,6 +298,20 @@ fi
# And last but not least, start the server
echo "Start SuperServer"
if [ -f "$FB_FW/Versions/A/Resources/.SuperServer" ]; then
if test $OSVERSION -lt 10
then
echo "SuperServer uses StartupItems"
chmod u+xg+xo+x /Library/StartupItems/Firebird/Firebird
/Library/StartupItems/Firebird/Firebird start
fi
fi
if [ -f "$FB_FW/Versions/A/Resources/.SuperServer" ]; then
if test $OSVERSION -gt 9
then
echo "SuperServer uses launchctl"
chmod u+xg+xo+x /Library/StartupItems/Firebird/Firebird
launchctl load /Library/LaunchDaemons/org.firebird.gds.plist
fi
fi

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.firebird.gds</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Frameworks/Firebird.framework/Resources/bin/fbguard</string>
<string>-daemon</string>
<string>-forever</string>
</array>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

View File

@ -168,6 +168,8 @@ darwin_finish_ss_framework:
cp ../src/extlib/fbudf/fbudf.sql $(FB_FW)/Resources/English.lproj/var/UDF
cp ../builds/install/arch-specific/darwin/FrameworkInfo.plist \
$(FB_FW)/Resources/Info.plist
cp ../builds/install/arch-specific/darwin/launchdss.org.firebird.gds.plist \
$(FB_FW)/Resources/org.firebird.gds.plist
cp ../builds/install/arch-specific/darwin/Readme.txt \
$(FB_FW)/Resources/Readme.txt
cp ../gen/install/misc/firebird.conf $(FB_FW)/Resources/English.lproj/var