mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-27 14:46:06 +08:00
兼容Debian系统
This commit is contained in:
parent
e05b0a2491
commit
a188134894
|
@ -468,7 +468,8 @@ export default class CronService {
|
|||
|
||||
private async set_crontab() {
|
||||
const tabs = await this.crontabs();
|
||||
var crontab_string = '';
|
||||
var crontab_string = `SHELL=${process.env.SHELL}\n`;
|
||||
crontab_string += `PATH=${process.env.PATH}\n`;
|
||||
tabs.data.forEach((tab) => {
|
||||
const _schedule = tab.schedule && tab.schedule.split(/ +/);
|
||||
if (tab.isDisabled === 1 || _schedule!.length !== 5) {
|
||||
|
|
|
@ -57,6 +57,10 @@ echo -e "容器启动成功..."
|
|||
echo -e "\n请先访问5700端口,登录成功面板之后再执行添加定时任务..."
|
||||
echo -e "############################################################\n"
|
||||
|
||||
crond -f >/dev/null
|
||||
if [ -x "$(command -v crond)" ]; then
|
||||
crond -f >/dev/null
|
||||
elif [ -x "$(command -v cron)" ]; then
|
||||
cron -f >/dev/null
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
|
Loading…
Reference in New Issue
Block a user