fix bug in the shell

少写了个分号;
不能用sh,要用source,否则无法继承环境变量
This commit is contained in:
renfenghuan
2020-12-18 10:45:52 +00:00
parent 97ffeeb273
commit 6a2954b1b1
2 changed files with 4 additions and 4 deletions

View File

@@ -107,9 +107,9 @@ if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then
echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile
fi
if [ $RANDOM_DELAY_MAX -ge 1 ] then
if [ $RANDOM_DELAY_MAX -ge 1 ]; then
echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... "
sh replaceNode_withRandomSleep.sh $mergedListFile
source replaceNode_withRandomSleep.sh $mergedListFile
fi
echo "加载最新的定时任务文件..."

View File

@@ -128,9 +128,9 @@ if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then
echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile
fi
if [ $RANDOM_DELAY_MAX -ge 1 ] then
if [ $RANDOM_DELAY_MAX -ge 1 ]; then
echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... "
sh replaceNode_withRandomSleep.sh $mergedListFile
source replaceNode_withRandomSleep.sh $mergedListFile
fi
echo "Load the latest crontab task file..."