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 correctcheckisrunning()
, 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
torm -f
because -r (recursive) applies only to directories.