Skip to content

Instantly share code, notes, and snippets.

@danuw
Forked from mendesbarreto/ngrokService.sh
Created September 29, 2020 15:52
Show Gist options
  • Save danuw/6ecede3c0024c8fa47702920b92a0a97 to your computer and use it in GitHub Desktop.
Save danuw/6ecede3c0024c8fa47702920b92a0a97 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