@@ -107,7 +107,7 @@ get_pool_flavors()
107
107
108
108
for i in ${flavors_available}; do
109
109
if [ "${i}" = "${oflavors}" ]; then
110
- ${SYSRC_CMD} -qf ${tmp_choice} flavors="${oflavors}" > /dev/null 2>&1
110
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} flavors="${oflavors}" > /dev/null 2>&1
111
111
flavors="${oflavors}"
112
112
fi
113
113
done
@@ -141,7 +141,7 @@ get_pool_images()
141
141
read oimages
142
142
for i in ${images_available}; do
143
143
if [ "${i}" = "${oimages}" ]; then
144
- ${SYSRC_CMD} -qf ${tmp_choice} images="${oimages}" > /dev/null 2>&1
144
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} images="${oimages}" > /dev/null 2>&1
145
145
images="${oimages}"
146
146
fi
147
147
done
@@ -197,7 +197,7 @@ get_pool_repos()
197
197
198
198
for i in ${repos_available}; do
199
199
if [ "${i}" = "${orepos}" ]; then
200
- ${SYSRC_CMD} -qf ${tmp_choice} repos="${orepos}" > /dev/null 2>&1
200
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} repos="${orepos}" > /dev/null 2>&1
201
201
repos="${orepos}"
202
202
fi
203
203
done
@@ -229,7 +229,7 @@ get_pool_max_runners()
229
229
fi
230
230
231
231
if [ ${omax_runners} -gt 0 ]; then
232
- ${SYSRC_CMD} -qf ${tmp_choice} max_runners="${omax_runners}" > /dev/null 2>&1
232
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} max_runners="${omax_runners}" > /dev/null 2>&1
233
233
max_runners="${omax_runners}"
234
234
fi
235
235
[ -n "${max_runners}" ] && break
@@ -256,7 +256,7 @@ get_pool_labels()
256
256
printf "Enter comma-separated labels: "
257
257
read olabels
258
258
labels=$( echo "${labels}" | ${TR_CMD} -d " " )
259
- ${SYSRC_CMD} -qf ${tmp_choice} labels="${olabels}" > /dev/null 2>&1
259
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} labels="${olabels}" > /dev/null 2>&1
260
260
labels="${olabels}"
261
261
break
262
262
done
@@ -289,7 +289,7 @@ get_pool_min_runners()
289
289
continue
290
290
fi
291
291
if [ ${omax_runners} -gt 0 ]; then
292
- ${SYSRC_CMD} -qf ${tmp_choice} min_runners="${omin_runners}" > /dev/null 2>&1
292
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} min_runners="${omin_runners}" > /dev/null 2>&1
293
293
min_runners="${omin_runners}"
294
294
fi
295
295
[ -n "${min_runners}" ] && break
327
327
328
328
if [ -z "${p}" ]; then
329
329
echo "APPLY"
330
- ${SYSRC_CMD} -qf ${tmp_choice} \
330
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${tmp_choice} \
331
331
flavors="${flavors}" \
332
332
images="${images}" \
333
333
repos="${repos}" \
@@ -430,7 +430,7 @@ if [ -z "${PAT}" ]; then
430
430
printf "${N1_COLOR}Please insert you PAT here: ${N2_COLOR}"
431
431
read PAT
432
432
if [ -n "${PAT}" ]; then
433
- ${SYSRC_CMD} -qf ${MOD_CONFIG} PAT="${PAT}" > /dev/null 2>&1
433
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} PAT="${PAT}" > /dev/null 2>&1
434
434
break
435
435
fi
436
436
done
443
443
if [ -z "${WEBHOOK_SECRET}" ]; then
444
444
WEBHOOK_SECRET=$( random_password_gen -l 64 )
445
445
${ECHO} "${N1_COLOR}${CBSD_APP}: bootstrap, new webhook secret was generated: ${N2_COLOR}${WEBHOOK_SECRET}${N0_COLOR}"
446
- ${SYSRC_CMD} -qf ${MOD_CONFIG} WEBHOOK_SECRET="${WEBHOOK_SECRET}" > /dev/null 2>&1
446
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} WEBHOOK_SECRET="${WEBHOOK_SECRET}" > /dev/null 2>&1
447
447
else
448
448
${ECHO} "${N1_COLOR}webhook secret exist: ${N2_COLOR}${WEBHOOK_SECRET}${N0_COLOR}"
449
449
fi
@@ -465,7 +465,7 @@ if [ -z "${URL}" ]; then
465
465
read URL
466
466
[ -z "${URL}" ] && URL="${URL_EXAMPLE}"
467
467
if [ -n "${URL}" ]; then
468
- ${SYSRC_CMD} -qf ${MOD_CONFIG} URL="${URL}" > /dev/null 2>&1
468
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} URL="${URL}" > /dev/null 2>&1
469
469
break
470
470
fi
471
471
done
@@ -502,13 +502,13 @@ if [ "${INIT_SUCCESS}" != "1" ]; then
502
502
${ECHO} "Your URL: ${URL}"
503
503
# we need to start GARM before init
504
504
PASSWORD=$( random_password_gen -l 64 )
505
- ${SYSRC_CMD} -qf ${MOD_CONFIG} PASSWORD="${PASSWORD}" > /dev/null 2>&1
505
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} PASSWORD="${PASSWORD}" > /dev/null 2>&1
506
506
echo "garm-cli init --name="local_garm" --url ${URL} -e root@localhost --username=mybee --password=\"${PASSWORD}\""
507
507
garm-cli init --name="local_garm" --url ${URL} -e root@localhost --username=mybee --password="${PASSWORD}"
508
508
_ret=$?
509
509
echo "ret: ${_ret}"
510
510
if [ ${_ret} -eq 0 ]; then
511
- ${SYSRC_CMD} -qf ${MOD_CONFIG} INIT_SUCCESS="1" > /dev/null 2>&1
511
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} INIT_SUCCESS="1" > /dev/null 2>&1
512
512
else
513
513
err 1 "${N1_COLOR}${CBSD_APP}: failed init${N0_COLOR}"
514
514
fi
@@ -573,7 +573,7 @@ case "${mode}" in
573
573
garm-cli repo create --credentials=mybee --name=${reponame} --owner=${owner} --webhook-secret="${WEBHOOK_SECRET}"
574
574
_ret=$?
575
575
echo "RET: ${_ret}"
576
- ${SYSRC} -qf ${MOD_CONFIG} repo+="${owner}/${reponame}" > /dev/null 2>&1
576
+ /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} repo+="${owner}/${reponame}" > /dev/null 2>&1
577
577
;;
578
578
lsrepo)
579
579
${ECHO} "${N1_COLOR}List of repo:${N0_COLOR}"
@@ -590,7 +590,7 @@ case "${mode}" in
590
590
${GARM_CLI_CMD} repo delete ${ID}
591
591
_ret=$?
592
592
echo "RET: ${_ret}"
593
- [ ${_ret} -eq 0 ] && ${SYSRC} -qf ${MOD_CONFIG} repo-="${owner}/${reponame}" > /dev/null 2>&1
593
+ [ ${_ret} -eq 0 ] && /usr/local/cbsd/misc/cbsdsysrc -qf ${MOD_CONFIG} repo-="${owner}/${reponame}" > /dev/null 2>&1
594
594
;;
595
595
addpool)
596
596
REPO_COUNT=$( cbsdsqlro /usr/local/etc/garm/garm.db "SELECT COUNT(id) FROM repositories;" 2>/dev/null )
0 commit comments