Skip to content

Instantly share code, notes, and snippets.

@cwilby
Created December 19, 2023 20:08
Show Gist options
  • Save cwilby/d3eb4f17e7723dddebfaad3d29ac1826 to your computer and use it in GitHub Desktop.
Save cwilby/d3eb4f17e7723dddebfaad3d29ac1826 to your computer and use it in GitHub Desktop.
#!/bin/bash
# clone the repo
git clone https://github.com/mindandmill/grafana-sms /opt/grafana-sms
# go to that directory
cd /opt/grafana-sms
# ask for node red token, then make an .env file and store it as the value for NODERED_TOKEN
read -p "Enter the Twilio Node-RED token" token
echo "NODERED_TOKEN=${token}" > .env
# install node modules
npm install
# install `grafana-sms.service` as a systemd service
sudo cp grafana-sms.service /etc/systemd/system/grafana-sms.service
sudo systemctl daemon-reload
sudo systemctl enable grafana-sms
sudo systemctl start grafana-sms
# test the service is up and running
curl http://localhost:32012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment