Skip to content

Instantly share code, notes, and snippets.

@kevinelgan
Forked from mendesbarreto/ngrokService.sh
Created December 22, 2018 19:40
Show Gist options
  • Save kevinelgan/816663a01946152792e539331d6fdca1 to your computer and use it in GitHub Desktop.
Save kevinelgan/816663a01946152792e539331d6fdca1 to your computer and use it in GitHub Desktop.
Script to start Ngrok at raspberry every boot
#! /bin/sh
# /etc/init.d/ngrok
case "$1" in
start)
echo "Ngrok service is starting"
screen ./ngrok start -all -config /home/pi/.ngrok2/ngrok.yml
echo "Ngrok service was started"
;;
stop)
echo "Ngrok is stopping"
killall ngrok
echo "Service ngrok was stopped"
;;
*)
echo "Usage: /etc/init.d/ngrok.sh {start|stop}"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment