From 6bf958c8dc27ac01ebf7a9a0e0a678a4b797c053 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 1 May 2024 15:12:07 +0200 Subject: [PATCH] autogain: allow temporary suspension via lock file --- rootfs/usr/local/bin/autogain1090 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rootfs/usr/local/bin/autogain1090 b/rootfs/usr/local/bin/autogain1090 index 81d17d8..b7efe01 100755 --- a/rootfs/usr/local/bin/autogain1090 +++ b/rootfs/usr/local/bin/autogain1090 @@ -11,6 +11,12 @@ gain_array=(0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 autogain_dir="/var/globe_history/autogain" mkdir -p $autogain_dir + +if [[ -f "${autogain_dir}/suspend" ]]; then + # allow temporary suspending of autogain by touching this file + exit 0 +fi + touch $autogain_dir/strong $autogain_dir/total