From bb5ab65d23b076af97282ff70ba9d4bc6b467352 Mon Sep 17 00:00:00 2001
From: Recolic <git@me.recolic.net>
Date: Thu, 6 Feb 2025 17:17:38 -0800
Subject: [PATCH] .

---
 fish-config/functions/mslab-tunnel.fish | 2 +-
 fish-config/functions/nupkg-repak.fish  | 9 +++++++++
 mybin/alliant-toolkit.sh                | 9 ++++-----
 mybin/rrdp                              | 1 +
 mybin/rwatchdog.sh                      | 4 ++--
 rflog.h                                 | 1 +
 6 files changed, 18 insertions(+), 8 deletions(-)
 create mode 100644 fish-config/functions/nupkg-repak.fish

diff --git a/fish-config/functions/mslab-tunnel.fish b/fish-config/functions/mslab-tunnel.fish
index 4562df5..49d13f1 100644
--- a/fish-config/functions/mslab-tunnel.fish
+++ b/fish-config/functions/mslab-tunnel.fish
@@ -1,5 +1,5 @@
 function mslab-tunnel
-    if test (count $argv) != 0 ; and $argv[1] = b
+    if test (count $argv) != 0 ; and test $argv[1] = b
         ssh -L 30627:127.0.0.1:30627 -Nf msbackup.recolic
     else
         ssh -L 30627:127.0.0.1:30627 -Nf ms.recolic
diff --git a/fish-config/functions/nupkg-repak.fish b/fish-config/functions/nupkg-repak.fish
new file mode 100644
index 0000000..0313f74
--- /dev/null
+++ b/fish-config/functions/nupkg-repak.fish
@@ -0,0 +1,9 @@
+function nupkg-repak
+set nu $argv[1]
+mkdir -p $nu.wd ; cd $nu.wd
+unzip ../$nu ; or unzip $nu ; or return 1
+cd content/Redist
+rm remote/*.lib ; rm remote/*.pdb ; cd ..
+zip -r r.zip Redist ; or return 2
+echo "DONE. CHECK r.zip"
+end
diff --git a/mybin/alliant-toolkit.sh b/mybin/alliant-toolkit.sh
index 49b4851..7a56154 100755
--- a/mybin/alliant-toolkit.sh
+++ b/mybin/alliant-toolkit.sh
@@ -134,12 +134,11 @@ function alliant_oneclick () {
     [[ ! -f $fname ]] || [[ $budget_cny = "" ]] && echo "
 Prog Usage:
 1. Export Alliant 60d history as CSV file
-2. Download Alliant statement
-3. Delete all unrelated Tx from CSV file (DO NOT delete the title line)
-4. Run this script like
+2. Delete all unrelated Tx from CSV file (DO NOT delete the title line)
+3. Run this script like
      alliant_oneclick 1.csv 7000
-5. Visual check: check if month_txt is correct
-6. Send HTML as email
+4. Visual check: check if month_txt is correct
+5. Send HTML as email
 " && exit 1
 
     ## start working
diff --git a/mybin/rrdp b/mybin/rrdp
index cfcc090..1b71a2c 100755
--- a/mybin/rrdp
+++ b/mybin/rrdp
@@ -25,6 +25,7 @@ host16   |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.18.31
 host18   |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.18.29
 host32   |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.10.94
 host33   |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.10.92
+hosttm   |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.21.28
 host1030 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.10.37
 host2021 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.15.30
 kedardbg |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.12.79
diff --git a/mybin/rwatchdog.sh b/mybin/rwatchdog.sh
index b98a62d..cdb1976 100755
--- a/mybin/rwatchdog.sh
+++ b/mybin/rwatchdog.sh
@@ -90,8 +90,8 @@ function low_battery_check_cron () {
         _alarm hard "battery lower than 20"
         return
     fi
-    if [[ "$bat_percent" -lt 50 ]]; then
-        _alarm soft "battery lower than 50"
+    if [[ "$bat_percent" -lt 40 ]]; then
+        _alarm soft "battery lower than 40"
         return
     fi
 }
diff --git a/rflog.h b/rflog.h
index 9fb1ac8..88769a4 100644
--- a/rflog.h
+++ b/rflog.h
@@ -1,4 +1,5 @@
 // GPT-4o generated. NOT thread safe.
+// v2502.1
 #ifndef SIMPLE_LOGGER_H
 #define SIMPLE_LOGGER_H
 
-- 
GitLab