Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'View firewall status via the Scripts menu' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View firewall status via the Scripts menu
Authored by: mark hunte on Aug 10, '06 01:53:22PM
Nice idea, but you script does not work for me.

so I modified it.


tell application "Finder"
	try
		set plistPath to "/Library/Preferences/com.apple.sharing.firewall"
		set getValue to (do shell script "defaults  read " & plistPath & "  state")
		if getValue is equal to "0" then
			set the name of (path to me) to "Firewall is (off )"
		else if getValue is equal to "1" then
			set the name of (path to me) to "Firewall is ( on )"
		end if
	on error
		set the name of (path to me) to "Firewall  ( UNKNOWN STATE )" -- just in case
		return
	end try
	return
end tell 

---
mh

[ Reply to This | # ]