From 3f6e787ae8d5b323fcda1f377deb7cc3438a3679 Mon Sep 17 00:00:00 2001 From: SabitOl Date: Mon, 18 May 2026 14:55:25 +0100 Subject: [PATCH 1/2] Modify cI.yml file to correct syntax error --- .github/workflows/cI.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cI.yml b/.github/workflows/cI.yml index e7cadb0..88fbfee 100644 --- a/.github/workflows/cI.yml +++ b/.github/workflows/cI.yml @@ -12,11 +12,15 @@ on: jobs: lint: - run-on: ubuntu-latest - uses: actions/checkout@v4 + runs-on: ubuntu-latest # Steps steps: + + # Checkout repository + - name: Checkout repository + uses: actions/checkout@v4 + # Install shellcheck to check for sytax errors and best practices in scripts - name: Install shellcheck run: sudo apt-get install -y -qq shellcheck From c3db9b3b3f880ff13ed750dc7884aecdc64101b9 Mon Sep 17 00:00:00 2001 From: SabitOl Date: Mon, 18 May 2026 15:02:02 +0100 Subject: [PATCH 2/2] Remove $ sign from THRESHOLD because it's an arithmetic variable --- ram-check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ram-check.sh b/ram-check.sh index a983e3b..da65d48 100755 --- a/ram-check.sh +++ b/ram-check.sh @@ -12,7 +12,7 @@ RAM_USAGE=$(free | grep Mem | awk '{print $3/$2 * 100.0}') # Discard the fraction after the dot CURRENT_USAGE=${RAM_USAGE%.*} -if (( CURRENT_USAGE > $THRESHOLD )); then +if (( CURRENT_USAGE > THRESHOLD )); then # zenity displays the message and disappears only when you press "Ok" # I prefer this over notify-send. You can miss the brief notify-send message zenity --info --title="RAM WATCHDOG" --text="Your RAM usage just passed ${THRESHOLD}%"