A monitoring service that listens to heartbeats from other devices and executes actions if no heartbeats are received after an inactive duration.
By default, sending a tweet is implemented as the action.
I made a Youtube video briefly going over it, link is here!
Intended for VPS hosting on Linux.
git clone https://github.com/echo4eva/deathbox.git
cd deathbox
cp .env.example .env
docker compose up --build- Change shared secret in
.env, this is what the client will use to authenticate with the service. Also change or remove Twitter keys/tokens. - Refactor code as you see fit.
db.goto change the duration, ormain.goto remove tweeting action.
Intended for Linux devices. Shell script runs on startup to send heartbeat to service.
Important files in this repo's /scripts directory
deathbox.service- systemd unit to run shell script on startupdeathbox.sh- shell script to curl the servicedeathbox.conf- config file that holds environment variables for the shell script
- Setting up
deathbox.service
mkdir -p ~/.config/systemd/user
curl https://raw.githubusercontent.com/echo4eva/deathbox/refs/heads/main/scripts/deathbox.service -o ~/.config/systemd/user/deathbox.service
systemctl --user daemon-reload
systemctl --user enable deathbox- Setting up
deathbox.sh
mkdir -p ~/.local/bin
curl https://raw.githubusercontent.com/echo4eva/deathbox/refs/heads/main/scripts/deathbox.sh -o ~/.local/bin/deathbox
chmod +x ~/.local/bin/deathbox- Setting up
deathbox.confAND EDIT
curl https://raw.githubusercontent.com/echo4eva/deathbox/refs/heads/main/scripts/.deathbox.conf -o ~/.deathbox.confMake sure to edit the configuration:
DEATHBOX_HOST- address of your service to send heartbeat toDEATHBOX_CLIENT_DEVICE- name of the client deviceDEATHBOX_SHARED_SECRET- value for authenticating client to service, should be the same
5HT2B/heartbeat - Used as reference for infrastructure and client setup! Shoutout to an oomf for telling me about this project.