<commit_before>#!/bin/bash

set -e

NOMAD_VERSION="0.5.0"
CURDIR=`pwd`

# Remove if already present
# NOTE: this is install only script
echo "Cleaning old Nomad installation if any"
sudo systemctl stop nomad-server.service
sudo rm -rf /tmp/nomad.zip
sudo rm -rf /usr/bin/nomad
sudo rm -rf /etc/nomad.d/
sudo rm -rf /opt/nomad/
sudo rm -rf /var/log/nomad

echo "Fetching Nomad ${NOMAD_VERSION} ..."

cd /tmp/

curl -sSL https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip -o nomad.zip

echo "Installing Nomad ${NOMAD_VERSION} ..."
unzip nomad.zip
sudo chmod +x nomad
sudo mv nomad /usr/bin/nomad

# Setup config directory for Nomad
sudo mkdir -p /etc/nomad.d/server
sudo mkdir -p /etc/nomad.d/client<commit_msg>Fix - Use systemd restart than sysetmd stop & systemd start. This seems to be fine during install.<commit_after>#!/bin/bash

set -e

NOMAD_VERSION="0.5.0"
CURDIR=`pwd`

# Remove if already present
# NOTE: this is install only script
echo "Cleaning old Nomad installation if any"

sudo rm -rf /tmp/nomad.zip
sudo rm -rf /usr/bin/nomad
sudo rm -rf /etc/nomad.d/
sudo rm -rf /opt/nomad/
sudo rm -rf /var/log/nomad

echo "Fetching Nomad ${NOMAD_VERSION} ..."

cd /tmp/

curl -sSL https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip -o nomad.zip

echo "Installing Nomad ${NOMAD_VERSION} ..."
unzip nomad.zip
sudo chmod +x nomad
sudo mv nomad /usr/bin/nomad

# Setup config directory for Nomad
sudo mkdir -p /etc/nomad.d/server
sudo mkdir -p /etc/nomad.d/client
{'fraction_non_alphanumeric': 0.12540400775694893, 'fraction_numerical': 0.006464124111182934, 'mean_word_length': 3.690909090909091, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3274269', 'n_tokens_mistral': 630, 'n_tokens_neox': 596, 'n_words': 178}