From dfff28513622f659430ef064322cfa701513feb0 Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Sat, 7 Feb 2026 17:47:16 +0000 Subject: Add run-flatbot wrapper script Goal is to keep all URLs in one place (file), because I forget to modify multiple files, when make changes. --- roles/flatbot/files/run-flatbot | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 roles/flatbot/files/run-flatbot (limited to 'roles/flatbot/files/run-flatbot') diff --git a/roles/flatbot/files/run-flatbot b/roles/flatbot/files/run-flatbot new file mode 100755 index 0000000..1d8869d --- /dev/null +++ b/roles/flatbot/files/run-flatbot @@ -0,0 +1,27 @@ +#! /usr/bin/env bash + +# Simple wrapper script to read URLs from configuration file. + +if [ "$#" -ne 2 ]; then + echo "Illegal number of parameters" 1>&2 + exit 1 +fi + +state=$1 +urlsfile=$2 + +urls="" + +while IFS= read -r line; +do + case "$line" in + ""|\#*) + continue + ;; + *) + urls="${urls} ${line}" + ;; + esac +done < $urlsfile + +exec /usr/bin/flatbot -state $state -once ${urls} -- cgit v1.2.3-70-g09d2