Skip to content

smokedsalmonbagel/hothost-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hothost-client

A set of scripts to install the HotHost getinfo.sh script as a supervisord service. Could work for other system monitoring scripts too.

Why

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)

Running

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

What it does

  • 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.

ReRunning

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.

Other

This script is pretty general purpose. You could fork it to install any script as a service quickly.

Uninstalling

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.conf Then sudo supervisorctl reload && sudo supervisorctl restart

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages