how to autorun script at startup as administrator?

Dave Stevens geek at uniserve.com
Mon Dec 16 03:20:52 UTC 2019


The subject line pretty much says it, I have a script to read and save
serial data from an attached sensor. I ssh in and sudo <scriptname> and
data gets read in and accumulates. From time to time (every few weeks)
there's a power interruption at the remote site where the sensor and
computer are. The box (Mint) restarts when power is restored and
currently I need to restart the script as set out above.

How can I ensure that the script will start too when power is restored?

The computer and sensor are powered alike, sensor power comes over the
USB port it's wired to, the sensor has no power switch, if there's
power it just reboots and starts.

For specificity it's a Plantower PMS5003 particulate sensor wired to a
usb cable that incorporates an inline UART to serve as a level shifter.

More details I can provide? references? will RTFM if pointed to one.

TIA

Dave




More information about the ubuntu-users mailing list