custom.sh not auto starting

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
bbatie
Posts: 2
Joined: Wed May 20, 2020 12:33 am

custom.sh not auto starting

Post by bbatie »

So I am pretty new to dietpi and I am trying to execute a python script using the autostart custom.sh file.
I added the command python my file.py and saved it and restarted and it doesn't execute the file.
But, if I use the bash command and manually run the custom.sh file it runs just fine.
Im sure its something basic Im missing, just not sure what.
Any ideas would be helpful.

Thanks,
Brandon
trendy
Posts: 121
Joined: Tue Feb 25, 2020 2:54 pm

Re: custom.sh not auto starting

Post by trendy »

Do you provide the full path to the file.py in the custom.sh script?
bbatie
Posts: 2
Joined: Wed May 20, 2020 12:33 am

Re: custom.sh not auto starting

Post by bbatie »

Yeah. It works fine if I just run the script, but its not working on boot for some reason.
trendy
Posts: 121
Joined: Tue Feb 25, 2020 2:54 pm

Re: custom.sh not auto starting

Post by trendy »

I don't have this script on my dietpis.
Where is it located and how is it configured to run on boot?
If you add in `/etc/cron.d/custom` with content `@reboot root /path/to/custom.sh` does it work on reboot?
Post Reply