Execute openhab-cli clean-cache without interactions

Re-read 1st line of my post ?

Any properly setup OH installation has no need to be rebooted.
So go debug your issues instead of fighting them by reboots, that is no fix.
Upgrade to latest 2.X (2.5.12 I think it is).

PS: you made us victim to the XY problem, see #8 in How to ask a good question / Help Us Help You