# DNF-Automatic - command emitter and reboot command

**URL:** <https://forums.rockylinux.org/t/dnf-automatic-command-emitter-and-reboot-command/17757>\
**Category:** Rocky Linux Help & Support\
**Created:** [March 2, 2025, 5:07pm UTC](https://forums.rockylinux.org/t/dnf-automatic-command-emitter-and-reboot-command/17757 "2025-03-02T17:07:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![starring\_vitality232](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@starring\_vitality232](https://forums.rockylinux.org/u/starring_vitality232)\
**Post date:** [March 2, 2025, 5:07pm UTC](https://forums.rockylinux.org/t/dnf-automatic-command-emitter-and-reboot-command/17757/1 "2025-03-02T17:07:08Z")

</div>

Dear community

I successfully set up DNF-Automatic on a Rocky 9 server, to fully automate security updates. It gives me peace of mind and does what it should.

I have two “problems” still unsolved and I’m looking for help:

1. How can I get the custom reboot command to work?  
I want the command to execute a particular script, just before rebooting. This script will notify me, that a reboot has happened.

Here are the commands I used now, but it did not work:

```auto
"/usr/local/scripts/notify-reboot-after-update.sh '⚠️ System has been rebooted\\. Please act\\.'; shutdown -r +5 'Rebooting after applying package updates'"

```

```auto
"/usr/local/scripts/notify-reboot-after-update.sh '⚠️ System has been rebooted\\. Please act\\.' && shutdown -r +5 'Rebooting after applying package updates'"

```

1. How do I get the “command” emitter to work?

I really spent a lot of time and effort to try figuring out how this works. None of my actions helped.  
Using the command emitter, I tried to also call a custom script and pass it the results of the DNF-Automatic activity. It should warn me about potential issues and when DNF-Automatic failed.

I also tried to use an easier approach and just save the output from DNF-Automatic to a file, using simple command as “cat”, “tee” or even “touch” (to see if a file is even being created).

I have seen people getting email emitters to work. The output from DNF-Automatic looks like a table, which gives out a good summary. However, the only place I see feedback from DNF-Automatic is in the journal.

Looking forward to any help. I’m also very open to suggestions/hints, if anyone has a better idea on how to successfully and reliably do automated security patching.

BR  
Gabriel

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [May 1, 2025, 5:07pm UTC](https://forums.rockylinux.org/t/dnf-automatic-command-emitter-and-reboot-command/17757/2 "2025-05-01T17:07:52Z")

</div>

Closed on May 1, 2025, 5:07pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
