diy.sh重命名为extra.sh,防止与diy命令混淆

This commit is contained in:
whyour 2021-04-01 23:55:32 +08:00
parent d5b9bca68b
commit 16ad626b43
4 changed files with 9 additions and 9 deletions

View File

@ -30,8 +30,8 @@ export default (app: Router) => {
let shareCodeFile = getLastModifyFilePath(config.shareCodeDir);
content = getFileContentByName(shareCodeFile);
break;
case 'diy':
content = getFileContentByName(config.diyFile);
case 'extra':
content = getFileContentByName(config.extraFile);
break;
default:
break;

View File

@ -12,7 +12,7 @@ const crontabFile = path.join(rootPath, 'config/crontab.list');
const confBakDir = path.join(rootPath, 'config/bak/');
const authConfigFile = path.join(rootPath, 'config/auth.json');
const shareCodeDir = path.join(rootPath, 'log/export_sharecodes/');
const diyFile = path.join(rootPath, 'config/diy.sh');
const extraFile = path.join(rootPath, 'config/extra.sh');
const logPath = path.join(rootPath, 'log/');
const authError = '错误的用户名密码,请重试';
const loginFaild = '请先登录!';
@ -38,7 +38,7 @@ export default {
loginFaild,
authError,
logPath,
diyFile,
extraFile,
shareCodeDir,
authConfigFile,
confBakDir,
@ -49,7 +49,7 @@ export default {
fileMap: {
'config.sh': confFile,
'crontab.list': crontabFile,
'diy.sh': diyFile,
'extra.sh': extraFile,
},
dbPath,
cronDbFile,

View File

@ -571,8 +571,8 @@ export JOY_RUN_HELP_MYSELF=""
################################## 是否添加DIY脚本选填 ##################################
## 如果你自己会写shell脚本并且希望在每次git_pull.sh这个脚本运行时额外运行你的DIY脚本请赋值为 "true"
## 同时,请务必将你的脚本命名为 diy.sh (只能叫这个文件名),放在 config 目录下
## 仓库下已经上传diy.sh模板如果你想使用可以参考本仓库下 diy.sh 文件地址https://raw.githubusercontent.com/dockere/jd-base/master/sample/diy.sh
## 同时,请务必将你的脚本命名为 extra.sh (只能叫这个文件名),放在 config 目录下
## 仓库下已经上传extra.sh模板如果你想使用可以参考本仓库下 extra.sh 文件地址https://raw.githubusercontent.com/dockere/jd-base/master/sample/diy.sh
EnableExtraShell=""

View File

@ -25,7 +25,7 @@ const Crontab = () => {
const updateConfig = () => {
request
.post(`${config.apiPrefix}save`, {
data: { content: value, name: 'diy.sh' },
data: { content: value, name: 'extra.sh' },
})
.then((data) => {
notification.success({
@ -50,7 +50,7 @@ const Crontab = () => {
return (
<PageContainer
className="code-mirror-wrapper"
title="diy.sh"
title="extra.sh"
extra={[
<Button key="1" type="primary" onClick={updateConfig}>