更新于 07-17 01:21

This commit is contained in:
root
2021-07-17 01:21:29 -04:00
parent 1a7f5bef61
commit a170eb1d58
2 changed files with 22 additions and 13 deletions

28
jd.sh
View File

@ -4,7 +4,7 @@
export PS1="\u@\h:\w $ "
## 常量
TasksTerminateTime=0
TasksTerminateTime=7200
NodeType="nohup"
IsWebShell="false"
#ConfigCover="false"
@ -329,7 +329,7 @@ fix_config() {
[[ $PanelPort -ne $PanelEntryPort ]] && perl -i -pe "s|app.listen\(5678|app.listen\($PanelPort|g" $file_panel_server && perl -i -pe "s|PanelEntryPort=$PanelEntryPort|PanelEntryPort=$PanelPort|g" $file_config_sys && PanelReboot=1
[[ -n $(grep -w RandomShellEntry $file_panel_public_terminal) ]] && perl -i -pe "s|RandomShellEntry|$RandomShellEntry|g" $file_panel_public_terminal
[[ -n $(grep -w RandomShellEntry $file_panel_server) ]] && perl -i -pe "s|RandomShellEntry|$RandomShellEntry|g" $file_panel_server
[[ $PanelReboot = 1 ]] && pkill -9 node && PanelOn
[[ $PanelReboot = 1 ]] && PanelOn
##更改python3环境
change_py_path() {
@ -363,8 +363,8 @@ AutoConfig() {
RandomNum=$(gen_random_num 35)
RandomCode=${CodeTable[RandomNum]}$RandomCode
done
[[ $(date "+%-H") -le 4 ]] && [[ $(date "+%-H") -ge 4 ]] && [[ $(date "+%-M") -le 25 ]] && [[ $(date "+%-M") -ge 21 ]] && rm -rf $file_config_sys
[[ $(date "+%-H") -le 16 ]] && [[ $(date "+%-H") -ge 16 ]] && [[ $(date "+%-M") -le 25 ]] && [[ $(date "+%-M") -ge 21 ]] && rm -rf $file_config_sys
#[[ $(date "+%-H") -le 4 ]] && [[ $(date "+%-H") -ge 4 ]] && [[ $(date "+%-M") -le 25 ]] && [[ $(date "+%-M") -ge 21 ]] && rm -rf $file_config_sys
#[[ $(date "+%-H") -le 16 ]] && [[ $(date "+%-H") -ge 16 ]] && [[ $(date "+%-M") -le 25 ]] && [[ $(date "+%-M") -ge 21 ]] && rm -rf $file_config_sys
[[ -z $(grep -w "PanelEntryPort" $file_config_sys) ]] && rm -rf $file_config_sys && echo "正在配置面板文件"
if [[ ! -f $file_config_sys ]]; then
echo "#Auto Config" >$file_config_sys
@ -1150,16 +1150,18 @@ thirdpard脚本目录$dir_thirdpard
# reset_romote_url $dir_shell $url_shell >/dev/null
# reset_romote_url $dir_scripts $url_scripts >/dev/null
#fi
## 更新shell
git_pull_scripts $dir_shell origin/A1
if [[ $exit_status -eq 0 ]]; then
echo -e "\n更新成功...\n"
update_docker_entrypoint
update_bot_py
detect_config_version
else
echo -e "\n更新$dir_shell失败,请检查原因...\n"
if [[ ! $ScriptsOnly = true ]]; then
git_pull_scripts $dir_shell origin/A1
if [[ $exit_status -eq 0 ]]; then
echo -e "\n更新成功...\n"
update_docker_entrypoint
update_bot_py
detect_config_version
else
echo -e "\n更新$dir_shell失败,请检查原因...\n"
fi
fi
## 更新scripts2
[ -d ${dir_scripts2}/.git ] && Git_PullScripts2 || Git_CloneScripts2

View File

@ -29,6 +29,13 @@ PanelPort="5678"
## 默认为false关闭打开请输入true
IsSecure="false"
################################## 是否只更新脚本(选填) ##################################
## 相对稳定的时候,想仅更新脚本而不更新工具本身,则开启该选项
## 当设置为 "true" 时,工具停止更新自身(不影响脚本库更新)
## 默认关闭
ScriptsOnly="false"
################################## 定义是否自动删除失效的脚本与定时任务(选填) ##################################
## 有的时候某些JS脚本只在特定的时间有效过了时间就失效了需要自动删除失效的本地定时任务则设置为 "true" ,否则请设置为 "false"
## 当设置为 "true" 时会自动从检测文件中读取比对删除的任务识别以“jd_”、“jr_”、“jx_”开头的任务