Skip to content

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.

  1. Create a folder startup at ~ or run mkdir ~/startup
  2. Create a file with nano startup.sh
  3. Copy the following content
#!/bin/bash

# Start teams-presence
cd ~/Teams-Presence/
sudo python3 teams-presence.py
exit
  1. Make the script executable with chmod +x startup.sh
  2. Install screen with sudo apt-get install screen
  3. Open sudo nano /etc/rc.local
  4. Paste su - pi -c "screen -dm -S pistartup ~/startup/startup.sh". This runs your startup script with every boot in a detached screen.
  5. Reboot with sudo reboot to take effect.
Clone this wiki locally