-
Notifications
You must be signed in to change notification settings - Fork 3
Run script at startup
Maxi edited this page May 27, 2020
·
3 revisions
To make the script run at startup, follow these steps. This will run the script in a detached screen.
- Create a folder startup at ~ or run
mkdir ~/startup
- Create a file with
nano startup.sh
- Copy the following content
#!/bin/bash
# Start speedtest-display
cd ~/speedtest-display/
python3 run-speedtest-display.py
exit
- Make the script executable with
chmod +x startup.sh
- Install screen with
sudo apt-get install screen
- Open
sudo nano /etc/rc.local
- Paste
su - pi -c "screen -dm -S pistartup ~/startup/startup.sh"
. This runs your startup script with every boot in a detached screen. - Reboot with
sudo reboot
to take effect.