]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Remove bashisms
authorAndrew Ruthven <andrew@etc.gen.nz>
Sat, 15 Jul 2023 12:25:15 +0000 (00:25 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Sat, 15 Jul 2023 12:26:12 +0000 (00:26 +1200)
ChangeLog
bin/mythtv-update-motd

index 0ae6aa71222a271f922422c4b77b9463a77f0b7d..94215d633ec60fe48bcaca7b3da0f7e63bb6e705 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2023-07-16  Andrew Ruthven
+  Remove bashisms
+
 2001-02-14  Andrew Ruthven
   Release version 1.0.2.
 
index 2df4d227d3c60e39fdaf1acfc0299d96cd955c0c..fce90c66d4d3c982e9cf898b23e9910af4764a8d 100755 (executable)
@@ -64,8 +64,10 @@ else
   # If the tempfile is less than 15 minutes old, object, otherwise
   # we'll assume that something went wrong and remove it.
   if [ -f $TEMPFILE ]; then
-      AGE=$(stat -c "%Z" $TEMPFILE);
-    if (( $AGE > $(date +'%s') - 900 ))
+    AGE=$(stat -c "%Z" $TEMPFILE);
+    THRESHOLD=$(( $(date +'%s') - 900 ))
+
+    if [ $AGE -gt $THRESHOLD ]
     then
         echo "I think another $NAME is running."
         exit 1