<commit_before>#!/bin/bash

# ---
# RightScript Name: RL10 Linux Enable Docker Support (Beta)
# Description: |
#   Enable RightLink Docker features if docker is installed
# Inputs:
#   RIGHTLINK_DOCKER:
#     Input Type: single
#     Category: RightLink
#     Description: |
#       Level of Docker integration for RightLink: monitoring + tagging; tagging; nothing.
#     Required: false
#     Advanced: true
#     Default: text:all
#     Possible Values:
#       - text:all
#       - text:tags
#       - text:none
# ...

set -e

command_exists() {
  command -v "$@" > /dev/null 2>&1
}

if ! command_exists docker; then
  echo "Docker is not installed - skipping enabling of docker support"
  exit
fi

# Enable docker support
rsc rl10 update /rll/docker/control "enable_docker=$RIGHTLINK_DOCKER"<commit_msg>IV-4475 - Use the correct path to rsc<commit_after>#!/bin/bash

# ---
# RightScript Name: RL10 Linux Enable Docker Support (Beta)
# Description: |
#   Enable RightLink Docker features if docker is installed
# Inputs:
#   RIGHTLINK_DOCKER:
#     Input Type: single
#     Category: RightLink
#     Description: |
#       Level of Docker integration for RightLink: monitoring + tagging; tagging; nothing.
#     Required: false
#     Advanced: true
#     Default: text:all
#     Possible Values:
#       - text:all
#       - text:tags
#       - text:none
# ...

set -e

command_exists() {
  command -v "$@" > /dev/null 2>&1
}

if ! command_exists docker; then
  echo "Docker is not installed - skipping enabling of docker support"
  exit
fi

# Determine location of rsc
[[ -e /usr/local/bin/rsc ]] && rsc=/usr/local/bin/rsc || rsc=/opt/bin/rsc

# Enable docker support
$rsc rl10 update /rll/docker/control "enable_docker=$RIGHTLINK_DOCKER"
{'fraction_non_alphanumeric': 0.11366245694603903, 'fraction_numerical': 0.009184845005740528, 'mean_word_length': 3.0534883720930233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '1264573', 'n_tokens_mistral': 599, 'n_tokens_neox': 551, 'n_words': 169}