浏览代码

command to restart pow process

cmar 13 年之前
父节点
当前提交
8d1fa09007
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      plugins/pow/pow.plugin.zsh

+ 9 - 0
plugins/pow/pow.plugin.zsh

@@ -72,5 +72,14 @@ powed(){
   find ~/.pow/ -type l -lname "*$basedir*" -exec basename {}'.dev' \;
   find ~/.pow/ -type l -lname "*$basedir*" -exec basename {}'.dev' \;
 }
 }
 
 
+# Restart pow process
+# taken from http://www.matthewratzloff.com/blog/2011/12/23/restarting-pow-when-dns-stops-responding
+repow(){
+  lsof | grep 20560 | awk '{print $2}' | xargs kill -9
+  launchctl unload ~/Library/LaunchAgents/cx.pow.powd.plist
+  launchctl load ~/Library/LaunchAgents/cx.pow.powd.plist
+  echo "restarted pow"
+}
+
 # View the standard out (puts) from any pow app
 # View the standard out (puts) from any pow app
 alias kaput="tail -f ~/Library/Logs/Pow/apps/*"
 alias kaput="tail -f ~/Library/Logs/Pow/apps/*"