question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, what’s the best way of making this start on boot?

I’m running it from a Raspberry Pi, and the only way I was able to make it successfully make it run as as root on boot was to add the following line to /etc/rc.local:

su pi -c 'cd /home/pi/Code/automate && sudo amazon-dash run < /dev/null &'

As you can see, this changes to the directory that contains the amazon-dash.yml file, then runs sudo amazon-dash run. I’m not sure what the rest of the line does, or if it’s required, but this whole approach seems like overkill, and I can’t help but feel it’s wrong.

I guess I have two question in that case:

  • is there a way of running the script by passing in a path to the config file (rather than having to cd into the directory that contains the file)
  • is there a better way of running the script on boot, maybe via init.d or something like that?

Thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Nekmocommented, May 23, 2017

Yes.

1reaction
Nekmocommented, May 23, 2017

Try:

sudo amazon-dash --config /home/pi/Code/automate/amazon-dash.yml run

If this has solved your problem, please close the task. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add an app to run automatically at startup in Windows 10
Select the Start button and scroll to find the app you want to run at startup. Right-click the app, select More, and then...
Read more >
How to make a Program run on startup in Windows 11/10
These programs start up for the current logged in user only. To directly access this folder, open Run, type shell:startup and hit Enter....
Read more >
How to add App to Startup in Windows 10 | Dell US
Open Run command box by pressing Windows logo + R keys. In the Run command field, type shell: startup and then press Enter...
Read more >
How To Autorun Programs On Startup In Windows 10
1. To do this either right-click on the Start Menu flag and left-click Run. Or use the keyboard shortcut Windows Key & R....
Read more >
How to Stop Windows Apps From Launching at Startup - PCMag
Go to Settings > Apps > Startup to view a list of all apps that can start up automatically and determine which should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found