Solved How can I write two separate outputs from one command?
-
@stacksofplates said in How can I write two separate outputs from one command?:
A timer would just be this:
[Unit] Description=Run Clam Scan [Timer] OnCalendar=*-*-* 00:00:00 Unit=scan.service [Install] WantedBy=default.target
Do you run
systemctl enable clamav.timer
andsystemclt start clamav.timer
instead of doing it with service? -
Service is failing, but timer is not?
-
@IRJ said in How can I write two separate outputs from one command?:
@stacksofplates said in How can I write two separate outputs from one command?:
A timer would just be this:
[Unit] Description=Run Clam Scan [Timer] OnCalendar=*-*-* 00:00:00 Unit=scan.service [Install] WantedBy=default.target
Do you run
systemctl enable clamav.timer
andsystemclt start clamav.timer
instead of doing it with service?Sorry was in the car, yeah you can do
systemctl enable --now clamav.timer
and it will do both. -
@IRJ said in How can I write two separate outputs from one command?:
Service is failing, but timer is not?
What's the output of
journalctl -u clamav
? -
@stacksofplates said in How can I write two separate outputs from one command?:
@IRJ said in How can I write two separate outputs from one command?:
Service is failing, but timer is not?
What's the output of
journalctl -u clamav
? -
What permission is needed on that script @stacksofplates ?
-
What's your script look like?
-
Oooh are you running from /tmp? Did you mount /tmp with noexec like the stigs want?
-
I ended up moving out of
/tmp
and the permission issue was fixed. It still failed because I wasnt specifying/bin/bash
before script file. Once I changed that it worked. -
@IRJ said in How can I write two separate outputs from one command?:
I ended up moving out of
/tmp
and the permission issue was fixed. It still failed because I wasnt specifying/bin/bash
before script file. Once I changed that it worked.Ah ok. Did you have
#!/bin/bash
in the script? I've never had it complain about that before? -
@stacksofplates said in How can I write two separate outputs from one command?:
@IRJ said in How can I write two separate outputs from one command?:
I ended up moving out of
/tmp
and the permission issue was fixed. It still failed because I wasnt specifying/bin/bash
before script file. Once I changed that it worked.Ah ok. Did you have #!/bin/bash in the script? I've never had it complain about that before?
Nope lol.