Commit 94747885 authored by David Smith's avatar David Smith Committed by david

Lots of Mac updates for wildfire; it should install correctly (now with proper...

Lots of Mac updates for wildfire; it should install correctly (now with proper dmg image), it installs as its own user now along the lines of the www and postfix users, and it should work with launchd properly. You can start it via sudo launchctl load /Library/LaunchDaemons/org.jivesoftware.wildfire.plist, and stop it by doing the same thing with unload instead of load. Tomorrow I'll get the initial system prefs pane in.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6335 b35dd754-fafc-0310-a699-88a17e54d16e
parent 61b57054
......@@ -1304,13 +1304,9 @@
<copy file="${basedir}/build/osx/org.jivesoftware.wildfire.plist"
todir="${mac.pkg.dir}/Library/LaunchDaemons"/>
<mkdir dir="${mac.dmg.dir}"/>
<exec executable="chown">
<arg line="-R root:wheel ${mac.pkg.dir}"/>
</exec>
<chmod perm="ug+x">
<fileset dir="${mac.pkg.dir}/usr/local/wildfire/bin">
<include name="wildfire.sh"/>
<include name="extra/launchd-wrapper.sh"/>
<include name="extra/wildfire-launchd-wrapper.sh"/>
</fileset>
<fileset dir="${basedir}/build/osx/resources"/>
</chmod>
......@@ -1343,10 +1339,10 @@
<arg value="dmg_wildfire.scpt"/>
<arg value="Wildfire"/>
<arg value="images"/>
<arg value="660"/>
<arg value="660"/>
<arg value="300"/>
<arg value="150"/>
<arg value="360"/>
<arg value="200"/>
<arg value="450"/>
<arg value="220"/>
<arg value="128"/>
</exec>
<exec executable="hdiutil" failonerror="true">
......
build/osx/dmgBackground.png

502 Bytes | W: | H:

build/osx/dmgBackground.png

8.79 KB | W: | H:

build/osx/dmgBackground.png
build/osx/dmgBackground.png
build/osx/dmgBackground.png
build/osx/dmgBackground.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>EnvironmentVariables</key>
<dict>
<key>WILDFIRE_HOME</key>
<string>/usr/local/wildfire</string>
<key>JAVA_HOME</key>
<string>/Library/Java/Home</string>
</dict>
<dict>
<key>Label</key>
<string>org.jivesoftware.wildfire</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/wildfire/bin/extra/launchd-wrapper.sh</string>
<string>/usr/local/wildfire/bin/extra/wildfire-launchd-wrapper.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<false/>
<key>ServiceDescription</key>
<string>Wildfire</string>
<key>StandardErrorPath</key>
<string>/usr/local/wildfire/logs/launchd.stderr</string>
<key>StandardOutPath</key>
<string>/usr/local/wildfire/logs/launchd.stout</string>
</dict>
<string>/usr/local/wildfire/logs/launchd.stdout</string>
<key>UserName</key>
<string>wildfire</string>
<key>WorkingDirectory</key>
<string>/usr/local/wildfire/lib</string>
</dict>
</plist>
#!/bin/sh
WILDFIRE_HOME=/usr/local/wildfire/
WILDFIRE_GID=`cat /private/tmp/wildfiregid`
rm /private/tmp/wildfiregid
/bin/launchctl load /System/Library/LaunchDaemons/org.jivesoftware.wildfire.plist
/bin/launchctl start org.jivesoftware.wildfire
\ No newline at end of file
chown -R wildfire $WILDFIRE_HOME
chgrp -R $WILDFIRE_GID $WILDFIRE_HOME
/bin/launchctl load /Library/LaunchDaemons/org.jivesoftware.wildfire.plist
......@@ -8,5 +8,11 @@ if [ -f /tmp/security ]; then
mv /tmp/security /usr/local/wildfire/resources/
fi
/bin/launchctl load /System/Library/LaunchDaemons/org.jivesoftware.wildfire.plist
/bin/launchctl start org.jivesoftware.wildfire
\ No newline at end of file
WILDFIRE_HOME=/usr/local/wildfire/
WILDFIRE_GID=`cat /private/tmp/wildfiregid`
rm /private/tmp/wildfiregid
chown -R wildfire $WILDFIRE_HOME
chgrp -R $WILDFIRE_GID $WILDFIRE_HOME
/bin/launchctl load /Library/LaunchDaemons/org.jivesoftware.wildfire.plist
\ No newline at end of file
#!/bin/bash
#determine safe uid/gid
WILDFIRE_USER=`nireport / /users name | grep "wildfire"`
WILDFIRE_GID=`nireport / /users gid | sort -n | egrep -v "\b[5-9][0-9]{2,5}\b" | tail -n 1`
let "WILDFIRE_GID=$WILDFIRE_GID+1"
echo $WILDFIRE_GID > /private/tmp/wildfiregid
if [ -z $WILDFIRE_USER] ; then
WILDFIRE_UID=`nireport / /users uid | sort -n | egrep -v "\b[5-9][0-9]{2,5}\b" | tail -n 1`
let "WILDFIRE_UID=$WILDFIRE_UID+1"
echo $WILDFIRE_UID
#create user
niutil -create . /users/wildfire
#set properties
niutil -createprop . /users/wildfire gid $WILDFIRE_GID
niutil -createprop . /users/wildfire uid $WILDFIRE_UID
niutil -createprop . /users/wildfire shell /usr/bin/false
niutil -createprop . /users/wildfire home /usr/local/wildfire/
niutil -createprop . /users/wildfire realname "Jive Wildfire"
niutil -createprop . /users/wildfire passwd '*'
fi
\ No newline at end of file
#!/bin/sh
# stop wildfire
/bin/launchctl stop org.jivesoftware.wildfire
/bin/launchctl unload /System/Library/LaunchDaemons/org.jivesoftware.wildfire.plist
/bin/launchctl unload /Library/LaunchDaemons/org.jivesoftware.wildfire.plist
# preserve these files, they should never be upgraded
cp /usr/local/wildfire/conf/wildfire.xml /tmp/
......
#!/bin/bash
export WILDFIRE_HOME=/usr/local/wildfire
export JAVA_HOME=/Library/Java/Home
function shutdown()
{
date
echo "Shutting down Wildfire"
$WILDFIRE_HOME/bin/wildfire.sh stop
kill -s TERM `ps auxww | grep -v wrapper | awk '/wildfire/ && !/awk/ {print $2}'`
}
date
echo "Starting Wildfire"
export CATALINA_PID=/tmp/$$
# uncomment to increase Wildfire's maximum heap allocation
# export JAVA_OPTS="-Xmx512M $JAVA_OPTS"
/usr/bin/java -server -jar "$WILDFIRE_HOME/lib/startup.jar" -Dwildfire.lib.dir=/usr/local/wildfire/lib&
$WILDFIRE_HOME/bin/wildfire.sh start
WILDFIRE_PID=`ps auxww | grep -v wrapper | awk '/wildfire/ && !/awk/ {print $2}'`
# allow any signal which would kill a process to stop Wildfire
trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment