Skip to content

Commit 686e896

Browse files
authored
fix: ensure to have autotest mode disabled by default (#8)
Previously service was failing to start after reboot (with BOOT=1) due to the "set -u" flag and AUTOTEST variable being unset.
1 parent 689f4b0 commit 686e896

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

loki_exporter.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ _do_bulk_post() {
5656
rm -f ${BULK_DATA}
5757

5858
if curl -fs -X POST -H "Content-Type: application/json" -H "Content-Encoding: gzip" -H "Authorization: Basic ${LOKI_AUTH_HEADER}" --data-binary "@${BULK_DATA}.payload.gz" "${LOKI_PUSH_URL}"; then
59-
if [ "${AUTOTEST}" -eq 1 ]; then
59+
if [ "${AUTOTEST-0}" -eq 1 ]; then
6060
mkdir -p results
6161
cp ${BULK_DATA}.payload.gz results/
6262
fi
@@ -144,7 +144,7 @@ fi
144144

145145
while true; do
146146
_main_loop
147-
if [ "${AUTOTEST}" -eq 1 ]; then
147+
if [ "${AUTOTEST-0}" -eq 1 ]; then
148148
exit 0
149149
fi
150150
echo "tailer exited, starting over" >&2

0 commit comments

Comments
 (0)