+ # Install/update the unit file if necessary.
+ if [ "${src_dir}" != "${dest_dir}" ]; then
+ cp "${src_dir}/${unit_file}" "${dest_dir}/" || exit 0
+ fi
+
+ # Enable service, and make sure systemd re-reads the unit
+ # file, in case we changed it.
+ if [ -e /run/systemd/system ]; then
+ systemctl daemon-reload || true
+ eval "$(systemctl -p UnitFileState show "${pkg}")"