接前文,我家里不是搭建了一个 V2ray 的全局代理么,要是持续运行太久,内存估计会吃不消,所以我在网上找到了一个小脚本,定时重启它。
本脚本必须要系统支持 systemd,我用的是Ubuntu,自带 systemd。
首先使用命令 nano /usr/local/restart 创建一个脚本文件,输入:
nano /usr/local/restart
#!/bin/sh systemctl restart v2ray
再创建一个服务,使用命令 nano /etc/systemd/system/restart.service,输入:
nano /etc/systemd/system/restart.service
[Unit] Description=Restart V2Ray [Service] Type=simple ExecStart=/bin/sh /usr/local/restart
然后再创建一个定时器,使用命令 nano /etc/systemd/system/restart.timer,输入:
nano /etc/systemd/system/restart.timer
[Unit] Description=Retart [Timer] OnBootSec=24h #首次启动后多少小时执行 OnUnitActiveSec=24h #每隔多少小时执行 Unit=restart.service [Install] WantedBy=multi-user.target
最后一步执行以下命令激活这个定时器即可:
systemctl start restart.timer && systemctl enable restart.timer
然而,Debain根本没有安装sudo,本文主要内容为如何安装sudo。
本文主要内容是介绍如何使用Project V项目的Dokodemo-door协议来科学上网进行提速,我这里测试到的效果上传速度至少有3倍的提升!
我是在是忍无可忍,索性自己也做个 Bot ,来以暴制暴!
本文的主要内容为如何使用 Post to IPFS 发布文档到 IPFS 网络,并让其他节点协助永久储存。
利用中转机加快上传速度
目录
热门标签
更多语言
站点信息