weblog of key_amb

主にIT関連の技術メモ

Mac起動時にsnmpdを起動する

1. /Library/LaunchDaemons/snmpd.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>Label</key>
	<string>snmpd</string>
	<key>Program</key>
	<string>/usr/sbin/snmpd</string>
	<key>OnDemand</key>
	<true/>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>

2. launchdでの起動設定

# rootで
> launchctl load -w /Library/LaunchDaemons/snmpd.plist
> launchctl start snmpd # 手動で起動
> reboot # 再起動