Voglio usare launchd per aggiornare periodicamente il mio albero MacPorts (cioè port selfupdate
.
Ho creato /Library/LaunchDaemons/org.macports.selfupdate.plist
:
$ ls -l /Library/LaunchDaemons/org.macports.selfupdate.plist
-rw-r--r-- 1 root wheel 669 8 Nov 12:49 /Library/LaunchDaemons/org.macports.selfupdate.plist
Ha il seguente contenuto:
<?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>org.macports.selfupdate</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/port</string>
<string>selfupdate</string>
</array>
<key>StandardOutPath</key>
<string>/var/log/org.macports.selfupdate.log</string>
<key>StandardErrorPath</key>
<string>/var/log/org.macports.selfupdate.err</string>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>604800</integer><!-- 1 week -->
</dict>
</plist>
L'ho caricato e verificato che sia caricato:
$ launchctl list | grep macports
- 78 org.macports.selfupdate
Ma non sembra che funzioni effettivamente.
$ port info wireshark
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
wireshark @1.12.8_3 (net)
...
Cosa mi manca?