Within the Karaf console, you can perform a shutdown using the
Ctrl+D
keys or the following logout
command.
Within the Karaf console, to perform a clean shutdown of Karaf, use the
system:shutdown
command, with an optional -f
(force) flag to avoid a yes/no
confirmation.
Furthermore, from a command shell, you can run bin\stop.bat
(Windows) or bin/stop
(Linux).
For more advanced functionality, it is also possible to delay the shutdown using time arguments. The time arguments can have different formats:
-
absolute time format
hh:mm
, in whichhh
is the hour (1 or 2 digits) andmm
is the minute of the hour (in two digits).For example, the following command will shutdown Karaf at 10:35am:
system:shutdown 10:35
-
duration format
+m
, in whichm
is the number of minutes to wait. The argumentnow
is an alias for+0
.For example, the following command will shutdown Karaf in 10 minutes:
system:shutdown +10