Created
January 1, 2012 03:22
-
-
Save eegrok/1546130 to your computer and use it in GitHub Desktop.
set up auto-announce of samba server on osx lion (since finder / pathfinder don't see samba servers by default atm)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from: http://macw.us/sek9nV | |
| (for more information on creating launch daemons / agents, go to http://j.mp/uYtpsJ ) | |
| create a file in ~/Library/LaunchAgents | |
| named something like: | |
| com.yourdomain.smb_server.domain_announce.plist | |
| <?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>Disabled</key> | |
| <false/> | |
| <key>Label</key> | |
| <string>com.yourdomain.smb_server.domain_announce</string> | |
| <key>KeepAlive</key> | |
| <true/> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/bin/dns-sd</string> | |
| <string>-P</string> | |
| <string>yourmachine</string> | |
| <string>_smb._tcp.</string> | |
| <string>.</string> | |
| <string>445</string> | |
| <string>192.168.1.33</string> | |
| <string>0.0.0.0</string> | |
| </array> | |
| </dict> | |
| </plist> | |
| change the "yourdomain", "yourmachine" and 192.168.1.33 appropriately (yourdomain / yourmachine are somewhat arbitrary -- the yourmachine will show up in finder, yourdomain I think is mostly just descriptive, and the ip address should be the ip of the samba server) | |
| the execute | |
| launchctl load ~/Library/LaunchAgents/com.yourdomain.smb_server.domain_announce.plist | |
| or reboot your machine (it'll stay running) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment