Skip to main content

rc.local - script message suppression [Resolved]

I am working on a Raspberry Pi project; it includes NUT server configuration and making the OS Image read-only.

I have completed the required steps and configured the NUT server.

I uninstalled the cron and required a alternate method to launch my application script on start up. after looking up some online resources, I have decided to use the rc.local file to launch my application script.

But when the system reboots I am seeing the my application script is continuously displaying the message generate by the NUT server command. Which used to be not visible when I was using the cron.

The following is the command that is generating a message every time the script is called. (My application script runs in a infinite loop).

Command:

upsc myups

Response:

Init SSL without certificate database

I have tried dumping the script output to /dev/null but it did not help.

/etc/rc.local

printf "Launching Script \n"

/home/pi/dataLog.sh & > /dev/null  2>&1

I am not sure if this is the right approach.


Question Credit: Kunal Sonone
Question Reference
Asked September 19, 2019
Posted Under: Unix Linux
16 views
1 Answers

Thank you, Christopher for the answer. The right method is

/home/pi/script > /dev/null 2>&1 & 

credit: Anthony Geoghegan
Answered September 19, 2019
Your Answer