¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Automating cleanup of printer output files


 

good thinking.

you could also pipe them to the Apache rotatelogs program, then you don't even need to poke hercules to change files.

On Sunday, July 19, 2020, 1:00:57 PM EDT, Patrik Schindler <poc@...> wrote:


Hello Doug,

Am 19.07.2020 um 17:12 schrieb Doug Wegscheid <dwegscheid@...>:

> There is a thread here referring to a hercctl utility to allow you to shoot commands at a running Hercules instance, but the link in it is stale, and I can't find it anywhere else.

Thanks for the hint to local http server! I completely forgot about that one. (I found a reference that it's just a shell script, so I don't need that anyway.)

I'll let logrotate do the housekeeping:

[/etc/logrotate.d/hercules-mvs]:
---8<---
/opt/mvsrun/prt/prt002.txt
/opt/mvsrun/prt/prt00e.txt
/opt/mvsrun/prt/prt00f.txt
{
? ? ? ? rotate 4
? ? ? ? weekly
? ? ? ? missingok
? ? ? ? notifempty
? ? ? ? compress
? ? ? ? delaycompress
? ? ? ? postrotate
? ? ? ? ? ? ? ? /opt/mvsrun/logrotate-prt.sh
? ? ? ? endscript
}
---8<---

[/opt/mvsrun/logrotate-prt.sh]:
---8<---
#!/bin/sh

for DEV in 002 00e 00f; do
? ? ? ? curl -d "command=devinit+${DEV}" -X POST
done
---8<---

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE -



Join [email protected] to automatically receive all group messages.