mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-07 20:06:08 +08:00
修复添加ck,初始化目录缺失
This commit is contained in:
parent
0563555a6a
commit
ac5e2e404e
|
@ -26,7 +26,7 @@ const initData = [
|
||||||
command: `sleep ${randomSchedule(
|
command: `sleep ${randomSchedule(
|
||||||
60,
|
60,
|
||||||
1,
|
1,
|
||||||
)} && diy whyour hundun "quanx/jx|quanx/jd" tokens >> $QL_DIR/log/diy_pull.log 2>&1`,
|
)} && diy https://ghproxy.com/https://github.com/whyour/hundun.git "quanx/jx|quanx/jd" tokens >> $QL_DIR/log/diy_pull.log 2>&1`,
|
||||||
schedule: `${randomSchedule(60, 1)} ${randomSchedule(
|
schedule: `${randomSchedule(60, 1)} ${randomSchedule(
|
||||||
24,
|
24,
|
||||||
6,
|
6,
|
||||||
|
|
|
@ -122,14 +122,15 @@ export default class CookieService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async create(payload: string[]): Promise<Cookie[]> {
|
public async create(payload: string[]): Promise<Cookie[]> {
|
||||||
const cookies = await this.cookies('', { postion: 1 });
|
const cookies = await this.cookies('');
|
||||||
let position = initCookiePosition;
|
let position = initCookiePosition;
|
||||||
if (cookies && cookies.length > 0) {
|
if (cookies && cookies.length > 0) {
|
||||||
position = cookies[0].position / 2;
|
position = cookies[cookies.length - 1].position;
|
||||||
}
|
}
|
||||||
const tabs = payload.map((x) => {
|
const tabs = payload.map((x) => {
|
||||||
const cookie = new Cookie({ value: x, position });
|
const cookie = new Cookie({ value: x, position });
|
||||||
position = position / 2;
|
position = position / 2;
|
||||||
|
cookie.position = position;
|
||||||
return cookie;
|
return cookie;
|
||||||
});
|
});
|
||||||
const docs = await this.insert(tabs);
|
const docs = await this.insert(tabs);
|
||||||
|
|
|
@ -3,6 +3,9 @@ set -e
|
||||||
|
|
||||||
echo -e "======================1. 检测配置文件========================\n"
|
echo -e "======================1. 检测配置文件========================\n"
|
||||||
[ ! -d ${QL_DIR}/config ] && mkdir -p ${QL_DIR}/config
|
[ ! -d ${QL_DIR}/config ] && mkdir -p ${QL_DIR}/config
|
||||||
|
[ ! -d ${QL_DIR}/log ] && mkdir -p ${QL_DIR}/log
|
||||||
|
[ ! -d ${QL_DIR}/db ] && mkdir -p ${QL_DIR}/db
|
||||||
|
[ ! -d ${QL_DIR}/manual_log ] && mkdir -p ${QL_DIR}/manual_log
|
||||||
|
|
||||||
if [ ! -s ${QL_DIR}/config/crontab.list ]
|
if [ ! -s ${QL_DIR}/config/crontab.list ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -32,7 +32,7 @@ mkdir -p ${diyscriptsdir}
|
||||||
if [ ! -d "$diyscriptsdir/${author}_${repo}" ]; then
|
if [ ! -d "$diyscriptsdir/${author}_${repo}" ]; then
|
||||||
echo -e "${author}本地仓库不存在,从远程拉取ing..."
|
echo -e "${author}本地仓库不存在,从远程拉取ing..."
|
||||||
repoTmp=${url##*/}
|
repoTmp=${url##*/}
|
||||||
repo=${repoTmpName%.*}
|
repo=${repoTmp%.*}
|
||||||
tmp=${url%/*}
|
tmp=${url%/*}
|
||||||
author=${tmp##*/}
|
author=${tmp##*/}
|
||||||
cd ${diyscriptsdir} && git clone $url ${author}_${repo}
|
cd ${diyscriptsdir} && git clone $url ${author}_${repo}
|
||||||
|
|
|
@ -6,11 +6,8 @@ ShellDir=${QL_DIR:-$(
|
||||||
)}
|
)}
|
||||||
[[ $QL_DIR ]] && ShellJs=js
|
[[ $QL_DIR ]] && ShellJs=js
|
||||||
LogDir=$ShellDir/log
|
LogDir=$ShellDir/log
|
||||||
[ ! -d $LogDir ] && mkdir -p $LogDir
|
|
||||||
DbDir=$ShellDir/db
|
DbDir=$ShellDir/db
|
||||||
[ ! -d $DbDir ] && mkdir -p $DbDir
|
|
||||||
ManualLogDir=$ShellDir/manual_log
|
ManualLogDir=$ShellDir/manual_log
|
||||||
[ ! -d $ManualLogDir ] && mkdir -p $ManualLogDir
|
|
||||||
ScriptsDir=$ShellDir/scripts
|
ScriptsDir=$ShellDir/scripts
|
||||||
ConfigDir=$ShellDir/config
|
ConfigDir=$ShellDir/config
|
||||||
FileConf=$ConfigDir/config.sh
|
FileConf=$ConfigDir/config.sh
|
||||||
|
@ -177,7 +174,7 @@ Git_Pull_Scripts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Git_Pull_Scripts_Next() {
|
Git_Pull_Scripts_Next() {
|
||||||
if [[ $ExitStatusShell -eq 0 ]]; then
|
if [[ $ExitStatusScripts -eq 0 ]]; then
|
||||||
echo -e "更新scripts成功...\n"
|
echo -e "更新scripts成功...\n"
|
||||||
[ ! -d $ScriptsDir/node_modules ] && Npm_Install scripts
|
[ ! -d $ScriptsDir/node_modules ] && Npm_Install scripts
|
||||||
[ -f $ScriptsDir/package.json ] && ScriptsDependNew=$(cat $ScriptsDir/package.json)
|
[ -f $ScriptsDir/package.json ] && ScriptsDependNew=$(cat $ScriptsDir/package.json)
|
||||||
|
|
|
@ -114,7 +114,9 @@ const Config = () => {
|
||||||
const match = record.value.match(/pt_pin=([^; ]+)(?=;?)/);
|
const match = record.value.match(/pt_pin=([^; ]+)(?=;?)/);
|
||||||
const val = (match && match[1]) || '未匹配用户名';
|
const val = (match && match[1]) || '未匹配用户名';
|
||||||
return (
|
return (
|
||||||
<span style={{ cursor: 'text' }}>{decodeURIComponent(val)}</span>
|
<span style={{ cursor: 'text' }}>
|
||||||
|
{decodeURIComponent(unescape(val))}
|
||||||
|
</span>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -226,7 +228,7 @@ const Config = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (value && loading) {
|
if (value && loading) {
|
||||||
asyncUpdateStatus();
|
// asyncUpdateStatus();
|
||||||
}
|
}
|
||||||
}, [value]);
|
}, [value]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user