Commit 464d3f76 authored by Rasmus Dahlberg's avatar Rasmus Dahlberg
Browse files

Merge branch 'feature/provision' into 'main'

Adds provision script

See merge request !1
parents 680ecb90 b709cb9b
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash
#
# Install dependencies and compile things on a fresh system for the monitor
# code.
#
# Tested on Debian Bullseye.
#

# Parameters
DIRNAME="`dirname $0`"
BASEPATH="$DIRNAME/.."
DEPENDENCIES_DEBIAN="golang"

# Debian
sudo apt-get update
sudo apt-get install -y $DEPENDENCIES_DEBIAN

# Build the monitor
cd $BASEPATH/monitor/follow-go
go build -o log-follow

if [ ! -z "$GOPATH" ]; then
  mkdir -p "$GOPATH/bin"
  mv log-follow "$GOPATH/bin/"
fi