Created
October 24, 2013 13:24
-
-
Save bao3/7137240 to your computer and use it in GitHub Desktop.
我的openwrt上安装了xunlei-lixian的python,并使用tmux 做为虚拟tty。但是经常会导致tmux能出,因此写了这个脚本,这样我每天只需要向迅雷离线的video目录放入文件,家里就可以自动探测节点下载,再也不担心会后台退出了。
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
#!/bin/sh | |
while true : | |
do | |
tmuxPID=$(ps w | grep tmux | grep download | grep -v grep | awk '{print $1}') | |
[ -z "$tmuxPID" ] && tmux new -d -s download 'python /bin/lx download --watch --category=video --node=fast --node-detection-acceptable=1M' | |
sleep 60; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment