Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Tried calling /bin/date? Commented Jul 7, 2022 at 12:53
  • @stoney Well yeah that's exactly what I'm trying to do, as shown under "If it was similar to a shell script, I could do something like:". I'm asking how to dynamically call it inside a systemd config file (every time the service restarts) and set it in the StandardOutput= and StandardError= fields? Commented Jul 8, 2022 at 0:21
  • I meant calling it with full path Commented Jul 19, 2022 at 11:46
  • 1
    @stoney Ah ok. Yeah that doesn't work either. Systemd unit files don't support $() in the first place. Commented Jul 20, 2022 at 6:56