]> hydra-www.ietfng.org Git - acmetensortoys-snakecontrol/commitdiff
Fix lcdproc-remind interaction by ensuring the log file exists
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Fri, 15 Dec 2017 04:02:44 +0000 (23:02 -0500)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 11 Feb 2018 00:05:51 +0000 (19:05 -0500)
At startup, until cron kicks off remind, we won't have a log file and
inotify will fail.  This is a tranient failure, at least.

bin/lcdproc-remind.expect

index a44bbbd31c5db4b49724755e5d8fede6e4ea747e..d983259619f0f4f9bafae9e4bbbd43c5df804e7d 100755 (executable)
@@ -45,6 +45,9 @@ proc spawninotify {filename} {
 
 set filename "/run/snakecontrol/remind.out"
 
+# Ensure that the file exists before we go to watch it.
+system "touch ${filename}"
+
 set waitsid [spawninotify ${filename}]
 
 while { true } {