Shaun
Shaun

Reputation: 11

Run command in foreground on boot

I'm running this command to output a log file in the console on a headless Raspberry pi with a screen hooked up to it.

$ tail -F /home/pi/Documents/BlackBot-master/bot.log

How do I set it up so it runs this command on boot and outputs the log on the screen? Right now I need to enter this command manually each time after it's booted.

Thanks!

Upvotes: 1

Views: 576

Answers (1)

Tom
Tom

Reputation: 21

Hopefully this help: https://www.raspberrypi.org/documentation/linux/usage/rc-local.md

You can try to add the command in /etc/rc.local. Sometimes you will need to add the absolute path of that command, for example, /usr/bin/tail ... .

Upvotes: 1

Related Questions