-
Notifications
You must be signed in to change notification settings - Fork 16
Run at startup
Maxi edited this page Nov 2, 2021
·
2 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 teams-presence
cd ~/Teams-Presence/
sudo python3 teams-presence.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.