0

I'm using Raspbian on the Pi and have a script to control some home automation stuff.

The script is designed to be a continuous loop monitoring the serial port and sending requests and logging events as it goes.

By default it prints some output and a polling symbol every 10 seconds (to let you know it's running). I want to keep this feature, but if I run it in the background, I really don't want to know about it (unless there's an error).

If I try and start the script with >nul it still outputs to the screen.

Also, I have the script starting in my /etc/rc.local in the background, but how can I determine if it actually started without error if it starts in the background?

metacubed
  • 7,031
  • 6
  • 36
  • 65
Madivad
  • 2,999
  • 7
  • 33
  • 60

1 Answers1

0

i usually use screen for this kind of process launching

screen -d -m -S asd top

when there is a problem you can attach to the screen by:

screen -r -x -S asd
Zoltán Haindrich
  • 1,788
  • 11
  • 20