Open fdcastel opened 1 year ago
I think that would be a great addition.
Just to be pedantic, your three examples of information are actually (partly) present now, albeit not obvious.
Not 100 % sure if that's correct, but anyway your suggestion is way more useful :-)
Looks good to me, please go ahead! :-)
@acolomb: yeah we discussed this a bit in the other issue, I mentioned mtime there, but I didn't consider atime could be used as well. That's clever.
Adding the info to the file's content is the better and more extensible idea anyway. I guess it's common on Linux distros nowadays to mount some system volumes with noatime
, so not really reliable.
Agreed 👍 very true.
Just to be pedantic, your three examples of information are actually (partly) present now, albeit not obvious.
You, sir, have eagle eyes. Nicely noted!
However, albeit clever:
1) this still leaves out where we could store the last error message if one occurred in the last run; and
2) as you already noted
> Adding the info to the file's content is the better and more extensible idea anyway. I guess it's common on Linux distros nowadays to mount some system volumes with `noatime`, so not really reliable.
Precisely! I have in my own home a small server with a ZFS filesystem mounted with `atime=off` (not that I'm planning to run Inaydn on it 😄).
Also, Inadyn could run in so many different systems (*) that the reliance of filesystem timestamps could be a flaky solution, at best.
_(*) I discovered this project when I found it running inside one of my routers._
I'm planning to attack this only in the next week so we still have time for more ideas and brainstorming.
For now, I leave you guys with a humble suggestion for the next cache file format (blatantly inspired on ddclient
format)
# inadyn 2.x.x cache file - do not modify
hostname=MY_DOMAIN.COM
ip=XXX.XXX.215.113
updatedAt=1695647451 # Mon Sep 25 10:11:56 2023
updateError= # None
lastRun=1695647451 # Mon Sep 25 10:11:56 2023
That looks very nice. And possible to source from a shell script, I like it!
Following #455. I propose:
1) To add a
--status
/--show-status
parameter to Inadyn.2) Extend the informations stored in Inadyn
cache
files.Opinions?
If approved, I would be glad to start working on a PR for this in the next week.