Last active
August 29, 2015 13:55
-
-
Save sdvcrx/8751950 to your computer and use it in GitHub Desktop.
popobox configure
This file contains 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
#===请按实际情况修改路径 | |
#定时保存进度 | |
#input-file=/root/.aria2/aria2.session | |
save-session=/root/.aria2/aria2.session | |
#定时保存会话,需要1.16.1之后的release版 | |
save-session-interval=1200 | |
#文件保存路径, 默认为当前启动位置 | |
dir=/mnt/disks/sda4/Downloads/ | |
# fix EOF error | |
max-tries=0 | |
retry-wait=5 | |
#===以下基本不用修改 | |
#允许rpc | |
enable-rpc=true | |
#允许所有来源, web界面跨域权限需要 | |
rpc-allow-origin-all=true | |
#允许非外部访问 | |
rpc-listen-all=true | |
#RPC端口, 仅当默认端口被占用时修改 | |
#rpc-listen-port=6800 | |
# ipv6 | |
disable-ipv6=true | |
#单任务队列 | |
max-concurrent-downloads=1 | |
#断点续传 | |
continue=true | |
#同服务器连接数 | |
max-connection-per-server=5 | |
#最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要 | |
min-split-size=10M | |
#单文件最大线程数, 路由建议值: 5 | |
split=5 | |
#下载速度限制 | |
max-overall-download-limit=0 | |
#单文件速度限制 | |
max-download-limit=0 | |
#上传速度限制 | |
max-overall-upload-limit=30k | |
#单文件上传速度限制 | |
max-upload-limit=20k | |
#断开速度过慢的连接 | |
#lowest-speed-limit=0 | |
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本 | |
#disk-cache=0 | |
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?) | |
#enable-mmap=true | |
#文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长 | |
#所需时间 none < falloc ? trunc << prealloc, falloc和trunc需要文件系统和内核支持 | |
file-allocation=none | |
#添加额外的tracker | |
#bt-tracker=<URI>,… | |
#单种子最大连接数 | |
#bt-max-peers=55 | |
#强制加密, 防迅雷必备 | |
#bt-require-crypto=true | |
#当下载的文件是一个种子(以.torrent结尾)时, 自动下载BT | |
follow-torrent=true | |
#BT监听端口, 当端口屏蔽时使用 | |
#listen-port=6881-6999 | |
#不确定是否需要,为保险起见,need more test | |
#不启用本地节点查找 | |
enable-dht=false | |
bt-enable-lpd=false | |
enable-peer-exchange=false | |
#修改特征 | |
user-agent=uTorrent/2210(25130) | |
peer-id-prefix=-UT2210- | |
#修改做种设置, 允许做种 | |
seed-ratio=0 | |
#保存会话 | |
#force-save=true | |
#bt-hash-check-seed=true | |
#bt-seed-unverified=true | |
#bt-save-metadata=true |
This file contains 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 | |
. /etc/profile | |
start_ntpd() { | |
sync_succeed= | |
servers=`less /etc/ntp.conf \ | |
| grep "server" \ | |
| awk -F" " '{print $2}'` | |
for server in "${servers}" ; do | |
/usr/local/bin/ntpdate ${server} >/dev/null 2>&1 && { | |
hwclock --systohc | |
sync_succeed="OK" | |
} | |
done | |
if [ "$sync_succeed"x = "OK"x ] ; then | |
/usr/local/bin/ntpd -l /var/log/ntpd.log | |
return $? | |
fi | |
tref="/var/spool/cron/crontabs/timeflag" | |
[ "`date -I'date'`"x != "`date -r $tref -I'date'`"x ] && { | |
sdate="`date -r $tref -I'date' | awk -F"-" '{print $1"."$2"."$3}'`" | |
stime="`date -r $tref | awk -F" " '{print $4}'`" | |
date "$sdate-$stime" >/dev/null 2>&1 | |
hwclock --systohc | |
} | |
} | |
ipaddr=`udhcpc -i eth0 2>&1 | grep "Lease of" | awk -F" " '{print $3}'` | |
start_ntpd | |
/sbin/watchdog -T 8 -t 4 /dev/watchdog | |
#/usr/bin/sshd | |
#nmbd -D | |
#smbd -D | |
[ -e /var/run/sys_reboot_flag ] || { | |
touch /var/run/sys_reboot_flag | |
echo `date -I'seconds' >> /var/log/sys_reboot_records` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment