Compare commits

..

3 Commits

Author SHA1 Message Date
iyuu.cn
01a9b71e9f 为避免多php版本带来困扰,cmd批处理内php采用环境变量调用。 2020-03-25 12:31:30 +08:00
iyuu.cn
f89b5f7325 v1.7.0 2020-03-23 13:19:45 +08:00
iyuu.cn
5880f563e8 增加通用备份脚本,可以添加进计划任务。 2020-03-23 13:05:03 +08:00
6 changed files with 28 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
@echo off
chcp 65001
%cd%\php\php %cd%\iyuu.php
php %cd%\iyuu.php
pause

View File

@@ -3,5 +3,5 @@ chcp 65001
git fetch --all
git reset --hard origin/master
git pull
%cd%\php\php.exe %cd%\iyuu.php
php %cd%\iyuu.php
pause

View File

@@ -1,4 +1,4 @@
@echo off
chcp 65001
D:\IYUUAutoReseed\php\php.exe D:\IYUUAutoReseed\iyuu.php
php D:\IYUUAutoReseed\iyuu.php
exit

View File

@@ -13,7 +13,7 @@ use IYUU\Library\Table;
class AutoReseed
{
// 版本号
const VER = '1.6.9';
const VER = '1.7.0';
// RPC连接
private static $links = [];
// 客户端配置

24
backup.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
# 传入的种子备份参数
if [ $1 ]; then
AppName=$1
fi
if [ $2 ]; then
torrentDir=$2
fi
# 脚本当前目录
pwddir=$(cd $(dirname $0); pwd)
# 当前日期
DATE=$(date +%Y%m%d)
# 备份在当前目录
backupdir=$pwddir"/"$AppName$DATE
echo "种子备份目录:"$backupdir
mkdir $backupdir -p
# 种子目录
torrentDir=$torrentDir"/*"
# 备份
cp -rf $torrentDir $backupdir
# 成功提示
echo "ok";

View File

@@ -1,5 +0,0 @@
@echo off
chcp 65001
git fetch --all
git reset --hard origin/master
git pull