Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymousUse committed Mar 8, 2021
1 parent 91d2dbe commit c778b65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git_pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function Update_Cron {
for ((i=1; i<${#RanHourArray[*]}; i++)); do
RanHour="${RanHour},${RanHourArray[i]}"
done
perl -i -pe "s|.+(bash git_pull.+)|${RanMin} ${RanHour} \* \* \* sleep ${RanSleep} && \1|" ${ListCron}
perl -i -pe "s|.+(bash.+git_pull.+log.*)|${RanMin} ${RanHour} \* \* \* sleep ${RanSleep} && \1|" ${ListCron}
crontab ${ListCron}
fi
}
Expand Down Expand Up @@ -77,7 +77,7 @@ function Git_PullScripts {

## 更新docker-entrypoint
function Update_Entrypoint {
if [[ $(cat ${ShellDir}/docker/docker-entrypoint.sh) != $(cat /usr/local/bin/docker-entrypoint.sh) ]]; then
if [[ ${JD_DIR} ]] && [[ $(cat ${ShellDir}/docker/docker-entrypoint.sh) != $(cat /usr/local/bin/docker-entrypoint.sh) ]]; then
cp -f ${ShellDir}/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
chmod 777 /usr/local/bin/docker-entrypoint.sh
fi
Expand Down

0 comments on commit c778b65

Please sign in to comment.