Add setting for launchctl to start Canna server automatically.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Thu, 12 Jul 2012 09:06:39 +0000 (18:06 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Thu, 12 Jul 2012 09:06:39 +0000 (18:06 +0900)
bootstrap.homebrew

index 46923ca..6fa397b 100755 (executable)
@@ -9,10 +9,24 @@ brew -v install berkeley-db
 brew -v install xaw3d
 brew -v install gettext
 
+if [ -f /Library/LaunchDaemons/homebrew.mxcl.canna.plist ]
+then
+    sudo launchctl unload -w /Library/LaunchDaemons/homebrew.mxcl.canna.plist
+fi
+if [ -x /usr/local/sbin/cannakill ]
+then
+    sudo /usr/local/sbin/cannakill
+fi
+
 (cd `brew --prefix` ; git pull https://github.com/chise/homebrew/)
 
 brew -v install canna
 
+sudo sh -c "sed 's/rc\.canna/rc.canna-root/' \
+    < /usr/local/Cellar/canna/3.7p3/homebrew.mxcl.canna.plist \
+    > /Library/LaunchDaemons/homebrew.mxcl.canna.plist"
+sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.canna.plist
+
 brew -v install wget
 
 ./configure \