usr

usr — uptime server reloader

A small POSIX shell watchdog for single servers. It checks a health URL once a minute and, after a few failed checks in a row, runs the reload command you give it.

No daemon, no database, no dashboard. One script, one systemd timer, and a line in the journal whenever something happens. It is written for the boring case: a small app behind nginx that occasionally stops answering and comes back after a reload.

Quick start

curl -fsSLO https://uptimeserverreloader.xyz/usr.sh
sudo install -m 755 usr.sh /usr/local/bin/usr
USR_URL=http://127.0.0.1:8080/health USR_CMD="systemctl reload myapp" usr

Run it by hand once to see that the health URL answers, then set up the timer described in the docs.

What it does not do

It does not restart anything on the first failure, it does not page you, and it does not try to be clever about why the check failed. If the reload command itself fails, usr logs it and tries again on the next round.