#!/bin/sh # The long-running half of this test project: a service that does nothing # except say so, once every ten seconds, forever. # # It writes into its own data directory -- the one resources.ron names -- so # that Uninstall's "remove data" toggle has something real to remove, and so # that the directory exists to be shown in the dialog. Its *log* is not # written here: a managed service's output is captured by Dev Updater's # service script, which is what the runtime log tab reads. set -eu DATA="${XDG_DATA_HOME:-$HOME/.local/share}/dutest-service" mkdir -p "$DATA" echo "started at $(date -Is), writing to $DATA" count=0 while true; do count=$((count + 1)) echo "$(date -Is) tick $count" >>"$DATA/ticks.log" # Colour, so the runtime log tab has escapes to render too -- the same # reason breakable/build.sh writes them. printf 'tick \033[1;32m%s\033[0m -- still here\n' "$count" sleep 10 done