@whyour/qinglong 2.17.10-rc.3 → 2.17.10-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/shell/otask.sh +1 -0
- package/shell/share.sh +3 -3
- package/static/build/services/cron.js +2 -0
package/package.json
CHANGED
package/shell/otask.sh
CHANGED
package/shell/share.sh
CHANGED
|
@@ -451,9 +451,9 @@ handle_task_start() {
|
|
|
451
451
|
run_task_before() {
|
|
452
452
|
. $file_task_before "$@"
|
|
453
453
|
|
|
454
|
-
if [[ $task_before ]]; then
|
|
454
|
+
if [[ ${task_before:=} ]]; then
|
|
455
455
|
echo -e "执行前置命令\n"
|
|
456
|
-
eval "$task_before" "$@"
|
|
456
|
+
eval "${task_before%;}" "$@"
|
|
457
457
|
echo -e "\n执行前置命令结束\n"
|
|
458
458
|
fi
|
|
459
459
|
}
|
|
@@ -463,7 +463,7 @@ run_task_after() {
|
|
|
463
463
|
|
|
464
464
|
if [[ ${task_after:=} ]]; then
|
|
465
465
|
echo -e "\n执行后置命令\n"
|
|
466
|
-
eval "$task_after" "$@"
|
|
466
|
+
eval "${task_after%;}" "$@"
|
|
467
467
|
echo -e "\n执行后置命令结束"
|
|
468
468
|
fi
|
|
469
469
|
}
|
|
@@ -462,11 +462,13 @@ let CronService = class CronService {
|
|
|
462
462
|
if (tab.task_before) {
|
|
463
463
|
commandVariable += `task_before='${tab.task_before
|
|
464
464
|
.replace(/'/g, "'\\''")
|
|
465
|
+
.replace(/;? *\n/g, ';')
|
|
465
466
|
.trim()}' `;
|
|
466
467
|
}
|
|
467
468
|
if (tab.task_after) {
|
|
468
469
|
commandVariable += `task_after='${tab.task_after
|
|
469
470
|
.replace(/'/g, "'\\''")
|
|
471
|
+
.replace(/;? *\n/g, ';')
|
|
470
472
|
.trim()}' `;
|
|
471
473
|
}
|
|
472
474
|
const crontab_job_string = `${commandVariable}${command}`;
|