Service Commands
Starting the Service
The start
command runs /etc/cte/secfs start
, and then waits until the CTE-U
service is up and running. This includes waiting for the encrypted directories to be mounted (something
systemctl
does not do). If CTE-U is already running, the start
command is not applicable.
Note
The start command is blocked until CTE-U is completely started and initialized. As long as cte_u_manager
detects any internal issues (refer to Performing Health Check for details), it is blocked and waits for the issues to resolve. That makes the start
command preferable over systemctl start cte_u_manager
, especially, if you are running it from a tool that expects CTE-U to be completely up and running when the command returns.
The following console output shows how systemctl start cte_u_manager
returns before the CTE-U service is completely up and running.
The following console output shows how the start command waits until CTE-U is completely up and running before it returns.
The following sequence of commands shows the start command is not applicable if CTE-U is already running:
Stopping the Service
The stop
command runs the /etc/cte/secfs stop
command internally, and then remains blocked and waits until CTE-U is completely shut down. It is essentially the same as the /etc/cte/secfs stop
command. The stop
command is provided for the sake of creating a complete set of stop
, start
, and restart
commands.
Restarting the Service
The restart
command restarts the CTE-U service. This command has the same effect as running the stop
command followed by the start
command.
The restart command is similar to, but not identical to, running the /etc/cte/secfs restart
command. The difference is that the restart command returns as soon as the CTE-U Agent and secfs_fuse
"parent process" are up and running.
If you have a set of encrypted directories, they probably are not protected immediately after the systemctl
command returns. The restart command, on the other hand, blocks until all the encrypted directories are protected.
Therefore, if you have an automated tool that starts CTE-U and expects the encrypted directories to be protected, the restart command is a better choice than /etc/cte/secfs restart
.
An example of the restart command is shown below:
-
Check the status of the CTE-U service.
The output shows that the service has been running for 45 minutes.
-
Restart the CTE-U service.
-
Recheck the status of the CTE-U service.
The output shows the CTE-U service is restarted and has been running for 39 seconds.