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.
sudo systemctl start secfs-fuse ; sudo /usr/bin/cte_u_manager issues
| head -1
There are 44 issues
The following console output shows how the start command waits until CTE-U is completely up and running before it returns.
sudo /usr/bin/cte_u_manager start ; sudo
/usr/bin/cte_u_manager issues | head -1
There are 0 issues
The following sequence of commands shows the start command is not applicable if CTE-U is already running:
sudo systemctl status cte_u_manager | grep Active:
Active: inactive (dead) since Tue 2020-12-29 10:29:51 EST; 9min ago
sudo /usr/bin/cte_u_manager start
sudo systemctl status cte_u_manager | grep Active:
Active: active (running) since Tue 2020-12-29 10:39:10 EST; 6s ago
sudo /usr/bin/cte_u_manager start
sudo systemctl status cte_u_manager | grep Active:
Active: active (running) since Tue 2020-12-29 10:39:10 EST; 15s ago
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.
sudo systemctl status secfs-fuse | grep Active: Active: active (running) since Tue 2020-12-29 09:30:29 EST; 45min agoThe output shows that the service has been running for 45 minutes.
-
Restart the CTE-U service.
sudo /usr/bin/cte_u_manager restart -
Recheck the status of the CTE-U service.
sudo systemctl status secfs-fuse | grep Active: Active: active (running) since Tue 2020-12-29 10:17:21 EST; 39s ago
The output shows the CTE-U service is restarted and has been running for 39 seconds.