Reinstalling Compressor/Qmaster on a running Final Cut Server

Thursday, September 25 2008 @ 11:30 AM EDT

Contributed by: MattG

Apple has issued Pro Applications Update 2008-003, which updates both Compressor and Qmaster to 3.0.4.

However, some of our clients were reporting more qmaster unresponsiveness than before the update, sometimes rendering qmaster irreparably unresponsive (say that three times fast).

Below then is a script that can completely wipe your install of Qmaster/Compressor. You can then reinstall from scratch the AppleQmasterNode.mpkg from the Final Cut Server installation disk, and then use Software Update to get it back to 3.0.4. All this without disturbing a running Final Cut Server. (Obviously, qmaster processes will fail during the reinstall, but if you're at this juncture, your qmaster is probably not working anyway.)


#!/bin/sh

cwd=`dirname "$0"`
cd "$"
id=`whoami`
trap 'exit' 2 EXIT

echo "Running on `date`, by $@`hostname`" | tee RemoveQmaster.log

echo "Shutting down Qmaster Processes"
if [ -e /usr/sbin/qmasterprefs ]; then
        qmasterprefs -stopSharing | tee -a RemoveQmaster.log
fi
sleep 5
if [ -e /Library/LaunchDaemons/com.apple.qmaster.qmasterd.plist ]; then
	echo "Unloading qmasterd launchd plist..." | tee -a RemoveQmaster.log
	sudo chmod 644 /Library/LaunchDaemons/com.apple.qmaster.qmasterd.plist
	sudo launchctl unload /Library/LaunchDaemons/com.apple.qmaster.qmasterd.plist
fi
echo "" | tee -a RemoveQmaster.log
echo "==========================================================================" | tee -a RemoveQmaster.log
echo "Removing Compressor and Qmaster..." | tee -a RemoveQmaster.log
sudo killall -9 qmasterd qmastercc qmasterca qmasterqd qmastertaskd compressord QmasterStatusMenu

echo "" | tee -a RemoveQmaster.log
for i in \
	"/Applications/Utilities/Batch Monitor.app" \
	"/Applications/Shake Qadministrator.app" \
	"/Applications/Apple Qadministrator.app" \
	"/Applications/Shake Qmaster.app" \
	"/Applications/Apple Qmaster.app" \
	"/Applications/Compressor.app" \
	"/etc/qmaster" \
	"/Library/Application Support/Apple Qmaster" \
	"/Library/Application Support/Shake Qmaster" \
	"/Library/PreferencePanes/Shake Qmaster.prefPane" \
	"/Library/PreferencePanes/Apple Qmaster.prefPane" \
	"/Library/StartupItems/Qmaster" \
	"/usr/sbin/qmasterprefs" \
	"/usr/sbin/qmasterqd" \
	"/usr/sbin/qmasterd" \
	"/usr/sbin/qmasterca" \
	"/Library/Frameworks/AECore.framework" \
	"/Library/Frameworks/Compressor.framework" \
	"/Library/Frameworks/MediaServerAPI.framework" \
	"/Library/Frameworks/Qmaster.framework" \
	"/Library/LaunchDaemons/com.apple.qmaster.qmasterd.plist" \
	"~/Application Support/Apple Qmaster" \
	"~/Application Support/Compressor" \
	"~/Library/Preferences/com.apple.AppleQmaster.plist" \
	"~/Library/Preferences/com.apple.Qadministrator.plist" \
	"~/Library/Preferences/com.apple.BatchMonitor.plist" \
	"~/Library/Preferences/com.apple.compressor.Compressor.plist" \
	"~/Library/Preferences/com.apple.Compressor.CompressorSharedService.plist" \
	"/Library/Receipts/Compressor.pkg" \
	"/Library/Receipts/Qmaster_Applications.pkg" \
	"/Library/Receipts/Qmaster_Services.pkg" \
	"/Library/Receipts/BatchMonitor.pkg" \
	"/Library/Receipts/Qmaster_Plugins.pkg" \
	"/Library/Receipts/Qmaster_Frameworks.pkg" \
	"/Library/Receipts/Swamp.pkg" \
	"/Library/Receipts/Qmaster.pkg" \
	"/Library/Receipts/Compressor.pkg" \
	"/Library/Receipts/QmasterUpdate2.3.pkg" \
	"/Library/Receipts/CompressorUpdate2.3.pkg" \
	"/Library/Receipts/Compressor3.0.2Update.pkg" \
	"/Library/Receipts/Compressor3.0.3Update.pkg" \
	"/Library/Receipts/Compressor3.0.4Update.pkg" \
	"/Library/Receipts/TranscoderX.pkg" \
	"/Library/Receipts/CompressorHelp.pkg" \
	"/Library/Receipts/QmasterHelp.pkg" \
	"/Library/Receipts/QadministratorHelp.pkg" \
	"/Library/Receipts/BatchMonitorHelp.pkg" \
	"/Library/Receipts/DSPPublishing.pkg" \
	"/var/run/jobcontroller:com.apple.qmaster.cluster.admin.pid" \
	"/var/run/jobcontroller:com.apple.compressor.cluster.admin.pid" \
	"/var/run/qmasterd.pid" \
	"/var/run/requestprocessor:com.apple.qmaster.contentcontroller.pid" \
	"/var/run/servicecontroller:com.apple.qmaster.executor.pid" \
	"/var/run/servicecontroller:com.apple.qmaster.stomp.transcoderx.pid" \
	"/var/run/servicecontroller:com.apple.stomp.transcoderx.pid" \
	"/var/run/servicecontroller:com.apple.qmaster.stomp.transcoderx.stomp.pid" \
	"/var/spool/qmaster"

do
        if [ -e "$" ]
        then
        sudo rm -rf "$"
        echo "REMOVED: "$"" | tee -a RemoveQmaster.log

#       else
#       echo "$ not present, skipping!"
        fi

done
echo "============================================================================" | tee -a RemoveQmaster.log
echo "Done!" | tee -a RemoveQmaster.log
echo "Please reinstall applications from your Final Cut Studio installation discs." | tee -a RemoveQmaster.log
echo "============================================================================" | tee -a RemoveQmaster.log
sudo chmod 666 RemoveQmaster.log

3 comments



http://www.xsanity.com/article.php?story=20080925101528213