5 Star 18 Fork 10

WeBank / WeIdentity-Build-Tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
crontab.sh 586 Bytes
一键复制 编辑 原始数据 按行查看 历史
yanggang 提交于 2020-08-07 16:25 . * fix bug
#!/bin/bash
# base path
ROOT_DIR=$(pwd)
WEIDENTITY_CRON_JOB_TPL=$ROOT_DIR/common/script/tpl/weidentity-cron-job.tpl
WEIDENTITY_CRON_JOB=$ROOT_DIR/common/script/tpl/weidentity-cron-job
# default configuration
export CRONTAB_TIME="0 1 * * *"
export BUILD_TOOL_DIR="$ROOT_DIR"
export USER="root"
if [ ! -d "logs" ]; then
mkdir logs
fi
# make the file
FISCOVAS='${CRONTAB_TIME}:${BUILD_TOOL_DIR}:${USER}'
envsubst ${FISCOVAS}} < ${WEIDENTITY_CRON_JOB_TPL} >${WEIDENTITY_CRON_JOB}
# copy to /etc/cron.d/
cp $WEIDENTITY_CRON_JOB /etc/cron.d/
# remove a file
rm $WEIDENTITY_CRON_JOB
Java
1
https://gitee.com/WeBank/WeIdentity-Build-Tools.git
git@gitee.com:WeBank/WeIdentity-Build-Tools.git
WeBank
WeIdentity-Build-Tools
WeIdentity-Build-Tools
master

搜索帮助