[GH-ISSUE #550] Many cron scripts don't work out-of-the-box on FreeBSD #138

Closed
opened 2026-05-07 00:19:19 +02:00 by BreizhHardware · 1 comment

Originally created by @alexdupre on GitHub (Apr 9, 2025).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/550

  • osh-remove-empty-folders.sh uses the -regextype egrep argument for find, that is not supported on FreeBSD, but there is the equivalent -E argument that needs to be set before the path
  • osh-rotate-ttyrec.sh uses the --signal USR1 argument for pkill, that is not supported on FreeBSD, but there is the equivalent -USR1 argument
  • osh-lingering-sessions-reaper.sh uses several unsupported arguments for ps; unfortunately there isn't a straightforward equivalent on FreeBSD, a more complex command pipeline needs to be used
Originally created by @alexdupre on GitHub (Apr 9, 2025). Original GitHub issue: https://github.com/ovh/the-bastion/issues/550 - `osh-remove-empty-folders.sh` uses the `-regextype egrep` argument for `find`, that is not supported on FreeBSD, but there is the equivalent `-E` argument that needs to be set *before* the path - `osh-rotate-ttyrec.sh` uses the `--signal USR1` argument for `pkill`, that is not supported on FreeBSD, but there is the equivalent `-USR1` argument - `osh-lingering-sessions-reaper.sh` uses several unsupported arguments for `ps`; unfortunately there isn't a straightforward equivalent on FreeBSD, a more complex command pipeline needs to be used
Author
Owner

@speed47 commented on GitHub (Jul 7, 2025):

Thanks for the report. I've pushed a fix for the two first cron scripts, as these are pretty straighforward. I'll look into the third one and check what is possible (I'd like to avoid aligning greps, but maybe this is the only solution)

<!-- gh-comment-id:3044331460 --> @speed47 commented on GitHub (Jul 7, 2025): Thanks for the report. I've pushed a fix for the two first cron scripts, as these are pretty straighforward. I'll look into the third one and check what is possible (I'd like to avoid aligning `grep`s, but maybe this is the only solution)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#138
No description provided.