I made a bunch of improvements to lucee_ctl which I’ve been running in production for more than a year, and I’m sure everyone would benefit from this enhanced version.
@Zackster let me know if it’s okay for me to submit a pull request?
lucee_ctl changelog
2025-08-03
Performance optimizations: restart is faster because it doesn’t arbitrarily wait 5 seconds when the server may have stopped much quicker than that; startup confirmation exits immediately upon success instead of waiting fixed time; stop is faster due to refactoring of redundant findpid calls; proactive stale PID cleanup prevents unnecessary process check.
Replaced findpid() with the more semantically correct checkisrunning(), which first deletes stale PID file from server reboot.
start() function now confirms whether the server is running (with 10 second timeout) and provides proper success/failure feedback instead of just assuming it worked.
stop() function now waits for graceful shutdown and provides better timeout messaging when forcing a kill.
status() function enhanced to show not just the PID but also “has been running since” datetime.
Added a proper restart() function that waits for confirmation of shutdown before starting again, replacing the old “stop, sleep 5, start” approach.
Improved error handling and user feedback throughout with more descriptive messages and exit status checking.
Removed support for environments that don’t have JRE installed because it is bundled with Lucee installer. That resulted in removal of substitution patterns @@luceeJREhome@@ and @@luceeJAVAhome@@ in lucee.xml which means change_user.sh can be tested independently of building the installer.
Removed support for OpenBD while remaining backward compatible with legacy automated workflows as long as the engine argument is set to “lucee”.
Refactored if statements to use [[ … ]] (bash conditional) instead of [ … ] (POSIX) and double quotes around variables to prevent word splitting and globbing.
Improved Usage statement by removing brackets around username argument because it is not optional.
Changed rm -rf to rm -f because -r (recursive) applies only to directories.
I came to realize the significance of the lucee.xml edit’s beneficial impact for testing change_user.sh!
Removed support for environments that don’t have JRE installed because it is bundled with Lucee installer. That resulted in removal of substitution patterns @@luceeJREhome@@ and @@luceeJAVAhome@@ in lucee.xml which means change_user.sh can be tested independently of building the installer.
Reverting functionality to make testing easier? Yeah nah, no go.
Being able to just the system JRE is way more useful and important than allowing some testing of script which gets changed once in a blue moon
plus your changes also broke the windows service.bat
I’ve done some improvements to the CI, it should no run on pull requests, it tests the service.bat for windows and it should bail on the publish to s3 when no creds are set or dry_run is true.
I see that the failed check in the GitHub build is related to downloading 6.2.2.90-RC so is there something I need to edit to update to 6.2.2.91 or does the build test just need to be updated and/or run again?