db751e2c89
Many of the mender CLI commands use systemctl commands to get information about the daemon, such as the PID (IE: systemctl show -p MainPID mender-client). As seen above, these commands expect the service file to be named "mender-client" instead of "mender." As such, in the current state, running a forced update check in the CLI will result in the following error: failed to force updateCheck: could not find the PID of the mender daemon. Changing the name of mender.service to mender-client.service fixes the issue. Signed-off-by: Adam Duskett <Aduskett@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
25 lines
643 B
Desktop File
25 lines
643 B
Desktop File
[Unit]
|
|
Description=Mender OTA update service
|
|
After=systemd-resolved.service
|
|
|
|
[Service]
|
|
Type=idle
|
|
User=root
|
|
Group=root
|
|
ExecStartPre=/bin/sh -c '\
|
|
if [ -L /var/lib/mender \
|
|
-a "$(readlink /var/lib/mender)" = "/var/run/mender" ]; then \
|
|
if rm -f /var/lib/mender >/dev/null 2>&1; then \
|
|
mkdir -p /var/lib/mender; \
|
|
else \
|
|
echo "No persistent location to store mender data. Data will be lost" \
|
|
echo "at reboot. Are you sure this is what you want to do?"; \
|
|
mkdir -p "$(readlink /var/lib/mender)"; \
|
|
fi; \
|
|
fi'
|
|
ExecStart=/usr/bin/mender -daemon
|
|
Restart=on-abort
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|