File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ RUN mkdir -p /versions/0-default \
4646# Set environment variables
4747ENV BASE_URL=https://telemetry.betterstack.com
4848ENV CLUSTER_COLLECTOR=false
49- ENV COLLECTOR_VERSION=1.1.24
49+ ENV COLLECTOR_VERSION=1.1.25
5050ENV VECTOR_VERSION=0.47.0
5151ENV OBI_VERSION=0.4.1
5252ENV CLUSTER_AGENT_VERSION=1.2.4
Original file line number Diff line number Diff line change 66SUPERVISORD_CONF=" /var/lib/better-stack/collector/supervisord.conf"
77BOOTSTRAP_CONF=" /bootstrap/supervisord.conf"
88
9+ NEEDS_BOOTSTRAP=false
10+ COLLECTOR_DIR=" /var/lib/better-stack/collector"
11+
912if [ ! -f " $SUPERVISORD_CONF " ]; then
10- echo " Supervisord config not found at $SUPERVISORD_CONF , copying from bootstrap..."
13+ echo " Supervisord config not found at $SUPERVISORD_CONF "
14+ NEEDS_BOOTSTRAP=true
15+ else
16+ for required_file in " $COLLECTOR_DIR /vector.sh" " $COLLECTOR_DIR /updater.rb" " $COLLECTOR_DIR /proxy.rb" ; do
17+ if [ ! -f " $required_file " ]; then
18+ echo " Incomplete install detected: $required_file is missing"
19+ NEEDS_BOOTSTRAP=true
20+ break
21+ fi
22+ done
23+ fi
24+
25+ if [ " $NEEDS_BOOTSTRAP " = true ]; then
26+ echo " Copying bootstrap supervisord config to $SUPERVISORD_CONF ..."
1127 mkdir -p " $( dirname " $SUPERVISORD_CONF " ) "
1228 cp " $BOOTSTRAP_CONF " " $SUPERVISORD_CONF "
1329 echo " Copied bootstrap supervisord config to $SUPERVISORD_CONF "
Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ if [ -n "$SWARM_CONTAINER" ]; then
8787 exit 1
8888fi
8989
90+ # Warn about existing data directory
91+ COLLECTOR_DATA_DIR=" /var/lib/better-stack"
92+ if [ -d " $COLLECTOR_DATA_DIR " ]; then
93+ echo " WARNING: $COLLECTOR_DATA_DIR already exists from a previous installation."
94+ echo " This is expected during upgrades. If you're fully reinstalling the collector, delete the directory first:"
95+ echo " rm -rf $COLLECTOR_DATA_DIR "
96+ fi
97+
9098# Create temporary directory and cd into it
9199TEMP_DIR=$( mktemp -d)
92100cd " $TEMP_DIR "
You can’t perform that action at this time.
0 commit comments