Forum: CFEngine Help Subject: Restarting processes based on mtime of non-Cfengine-managed files? Author: jgreer Link to topic: https://cfengine.com/forum/read.php?3,24100,24100#msg-24100
Does anyone have examples of restarting processes if they have been running longer than the last modified time of an associated file? I'd like a reusable bundle to do this but it's not clear to me whether there's a way to accomplish it with native Cfengine functions. I'd like to avoid drawing the file's mtime into a var based on executing "stat -c %Y ". I don't believe there's a native way to return the mtime of a file nor the integer representation of a process's start time as an int for plugging into irange() - is that right? Note that the files in question aren't suitable for drawing into Cfengine and driving with copies + if_repaired() - they're dynamically generated on clients. Thanks, -Jessica _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine