[Unit] Description=Write the number of pending updates in /run/user/%U/pending-updates [Service] ExecStart=/bin/sh -c 'checkupdates | wc -l > /run/user/%U/pending-updates'