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 @@ ...@@ -1304,13 +1304,9 @@
<copy file="${basedir}/build/osx/org.jivesoftware.wildfire.plist" <copy file="${basedir}/build/osx/org.jivesoftware.wildfire.plist"
todir="${mac.pkg.dir}/Library/LaunchDaemons"/> todir="${mac.pkg.dir}/Library/LaunchDaemons"/>
<mkdir dir="${mac.dmg.dir}"/> <mkdir dir="${mac.dmg.dir}"/>
<exec executable="chown">
<arg line="-R root:wheel ${mac.pkg.dir}"/>
</exec>
<chmod perm="ug+x"> <chmod perm="ug+x">
<fileset dir="${mac.pkg.dir}/usr/local/wildfire/bin"> <fileset dir="${mac.pkg.dir}/usr/local/wildfire/bin">
<include name="wildfire.sh"/> <include name="extra/wildfire-launchd-wrapper.sh"/>
<include name="extra/launchd-wrapper.sh"/>
</fileset> </fileset>
<fileset dir="${basedir}/build/osx/resources"/> <fileset dir="${basedir}/build/osx/resources"/>
</chmod> </chmod>
...@@ -1343,10 +1339,10 @@ ...@@ -1343,10 +1339,10 @@
<arg value="dmg_wildfire.scpt"/> <arg value="dmg_wildfire.scpt"/>
<arg value="Wildfire"/> <arg value="Wildfire"/>
<arg value="images"/> <arg value="images"/>
<arg value="660"/> <arg value="360"/>
<arg value="660"/> <arg value="200"/>
<arg value="300"/> <arg value="450"/>
<arg value="150"/> <arg value="220"/>
<arg value="128"/> <arg value="128"/>
</exec> </exec>
<exec executable="hdiutil" failonerror="true"> <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"?> <?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"> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>Disabled</key> <key>Label</key>
<false/> <string>org.jivesoftware.wildfire</string>
<key>EnvironmentVariables</key> <key>OnDemand</key>
<dict> <false/>
<key>WILDFIRE_HOME</key> <key>ProgramArguments</key>
<string>/usr/local/wildfire</string> <array>
<key>JAVA_HOME</key> <string>/usr/local/wildfire/bin/extra/wildfire-launchd-wrapper.sh</string>
<string>/Library/Java/Home</string> </array>
</dict> <key>RunAtLoad</key>
<key>Label</key> <false/>
<string>org.jivesoftware.wildfire</string> <key>ServiceDescription</key>
<key>OnDemand</key> <string>Wildfire</string>
<false/> <key>StandardErrorPath</key>
<key>ProgramArguments</key> <string>/usr/local/wildfire/logs/launchd.stderr</string>
<array> <key>StandardOutPath</key>
<string>/usr/local/wildfire/bin/extra/launchd-wrapper.sh</string> <string>/usr/local/wildfire/logs/launchd.stdout</string>
</array> <key>UserName</key>
<key>RunAtLoad</key> <string>wildfire</string>
<true/> <key>WorkingDirectory</key>
<key>ServiceDescription</key> <string>/usr/local/wildfire/lib</string>
<string>Wildfire</string> </dict>
<key>StandardErrorPath</key> </plist>
<string>/usr/local/wildfire/logs/launchd.stderr</string>
<key>StandardOutPath</key>
<string>/usr/local/wildfire/logs/launchd.stout</string>
</dict>
</plist>
\ No newline at end of file
#!/bin/sh #!/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 chown -R wildfire $WILDFIRE_HOME
/bin/launchctl start org.jivesoftware.wildfire chgrp -R $WILDFIRE_GID $WILDFIRE_HOME
\ No newline at end of file
/bin/launchctl load /Library/LaunchDaemons/org.jivesoftware.wildfire.plist
...@@ -8,5 +8,11 @@ if [ -f /tmp/security ]; then ...@@ -8,5 +8,11 @@ if [ -f /tmp/security ]; then
mv /tmp/security /usr/local/wildfire/resources/ mv /tmp/security /usr/local/wildfire/resources/
fi fi
/bin/launchctl load /System/Library/LaunchDaemons/org.jivesoftware.wildfire.plist WILDFIRE_HOME=/usr/local/wildfire/
/bin/launchctl start org.jivesoftware.wildfire WILDFIRE_GID=`cat /private/tmp/wildfiregid`
\ No newline at end of file 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 #!/bin/sh
# stop wildfire # stop wildfire
/bin/launchctl stop org.jivesoftware.wildfire /bin/launchctl unload /Library/LaunchDaemons/org.jivesoftware.wildfire.plist
/bin/launchctl unload /System/Library/LaunchDaemons/org.jivesoftware.wildfire.plist
# preserve these files, they should never be upgraded # preserve these files, they should never be upgraded
cp /usr/local/wildfire/conf/wildfire.xml /tmp/ cp /usr/local/wildfire/conf/wildfire.xml /tmp/
......
#!/bin/bash #!/bin/bash
export WILDFIRE_HOME=/usr/local/wildfire export WILDFIRE_HOME=/usr/local/wildfire
export JAVA_HOME=/Library/Java/Home
function shutdown() function shutdown()
{ {
date date
echo "Shutting down Wildfire" echo "Shutting down Wildfire"
$WILDFIRE_HOME/bin/wildfire.sh stop kill -s TERM `ps auxww | grep -v wrapper | awk '/wildfire/ && !/awk/ {print $2}'`
} }
date date
echo "Starting Wildfire" echo "Starting Wildfire"
export CATALINA_PID=/tmp/$$
# uncomment to increase Wildfire's maximum heap allocation /usr/bin/java -server -jar "$WILDFIRE_HOME/lib/startup.jar" -Dwildfire.lib.dir=/usr/local/wildfire/lib&
# export JAVA_OPTS="-Xmx512M $JAVA_OPTS"
$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 # allow any signal which would kill a process to stop Wildfire
trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP
echo "Waiting for `cat $WILDFIRE_PID`" echo "Waiting for `cat $WILDFIRE_PID`"
wait `cat $WILDFIRE_PID` wait `cat $WILDFIRE_PID`
\ No newline at end of file
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