A set of scripts to install the HotHost getinfo.sh script as a supervisord service. Could work for other system monitoring scripts too.
HotHost provides simple notifications of system status. This set of scripts simplifies deployment of the client updater script.
- More robust proper service configuration with supervisord
- Does not need to export credentials ENV variables.
- Can be deployed with one line (see below)
cd ~/
mkdir hothost
cd hosthost
curl https://raw.githubusercontent.com/smokedsalmonbagel/hothost-client/main/install-client.sh -o install-client.sh && chmod u+x install-client.sh && ./install-client.sh
Click "New Host" in HotHost app.
Enter URL, update interval and secret key from provided by HotHost
- Goes to this repo, downloads and runs
install-client.sh - Prompts for URL, interval and secret. Stores them to hhconfig.sh
- Downloads hothost.conf supervisord config file. Updates it with install directory name and user.
- Installs supervisord if not already installed.
- Moves the config to
/etc/supervisor/conf.d/hothost.conf - Rereads supervisord configs and starts the service.
Within a few seconds the new host will pop up on the HotHost app.
You can rerun install-client.sh if you want to change the config variables but you will either need to make a new host or take note of you secret key.
This script is pretty general purpose. You could fork it to install any script as a service quickly.
Everything is in the ~/hothost directory except the supervisord config. rm -rf ~/hothost if you used the directions above.
-
If you don't need supervisord anymore
sudo apt remove supervisor -
If you do, remove the config
sudo rm /etc/supervisor/conf.d/hothost.confThensudo supervisorctl reload && sudo supervisorctl restart