fix: fix: agents entrypoint crashes — pname unbound variable in cron setup (#171)
This commit is contained in:
parent
f5de84ae02
commit
79d46f1e99
1 changed files with 2 additions and 2 deletions
|
|
@ -20,8 +20,7 @@ log() {
|
||||||
install_project_crons() {
|
install_project_crons() {
|
||||||
local cron_lines="DISINTO_CONTAINER=1
|
local cron_lines="DISINTO_CONTAINER=1
|
||||||
USER=agent
|
USER=agent
|
||||||
FORGE_URL=http://forgejo:3000
|
FORGE_URL=http://forgejo:3000"
|
||||||
PROJECT_REPO_ROOT=/home/agent/repos/${pname}"
|
|
||||||
for toml in "${DISINTO_DIR}"/projects/*.toml; do
|
for toml in "${DISINTO_DIR}"/projects/*.toml; do
|
||||||
[ -f "$toml" ] || continue
|
[ -f "$toml" ] || continue
|
||||||
local pname
|
local pname
|
||||||
|
|
@ -32,6 +31,7 @@ with open(sys.argv[1], 'rb') as f:
|
||||||
" "$toml" 2>/dev/null) || continue
|
" "$toml" 2>/dev/null) || continue
|
||||||
|
|
||||||
cron_lines="${cron_lines}
|
cron_lines="${cron_lines}
|
||||||
|
PROJECT_REPO_ROOT=/home/agent/repos/${pname}
|
||||||
# disinto: ${pname}
|
# disinto: ${pname}
|
||||||
2,7,12,17,22,27,32,37,42,47,52,57 * * * * ${DISINTO_DIR}/review/review-poll.sh ${toml} >>/home/agent/data/logs/cron.log 2>&1
|
2,7,12,17,22,27,32,37,42,47,52,57 * * * * ${DISINTO_DIR}/review/review-poll.sh ${toml} >>/home/agent/data/logs/cron.log 2>&1
|
||||||
4,9,14,19,24,29,34,39,44,49,54,59 * * * * ${DISINTO_DIR}/dev/dev-poll.sh ${toml} >>/home/agent/data/logs/cron.log 2>&1
|
4,9,14,19,24,29,34,39,44,49,54,59 * * * * ${DISINTO_DIR}/dev/dev-poll.sh ${toml} >>/home/agent/data/logs/cron.log 2>&1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue