How to set auto run after boot on raspberry pi? #345
I tried to run ngrok after boot on raspberry pi by the following way but failed.
Auto run setting that I tried
1. Create a sh file.
##! /bin/sh ngrok start --all \ --config=/home/pi/.ngrok2/ngrok.yml \ --log=stdout \ > /home/pi/ngrok.log &
I checked ngrok works by manual running of this sh file.
2. Add a command to /etc/rc.local before exit.
.. .. /home/pi/run_after_boot.sh exit 0
I checked ngrok works by manual running of this file (/etc/rc.local).
3. Remove a log file created by nglok.
5. Check log file and process
The log file is created but nothing is written.
ngrok does not run.
I also tried the following but the result of logfile is same.
Add sleep before ngrok
##! /bin/sh (sleep 10 && ngrok start --all \ --config=/home/pi/.ngrok2/ngrok.yml \ --log=stdout \ > /home/pi/ngrok.log) &
$ ngrok -v ngrok version 2.1.1
$ uname -a Linux raspberrypi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux
Sorry, it was my failure.
A command after modification.
I'm trying something similar (or the same).
this is a script, which has been added to