0

Is it possible to run a python script as well as a command from terminal on startup?

I have successfully executed the python script as mentioned in the link below.

https://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/

and i want to run below command from terminal.

raspivid -n -ih -t 0 -rot 0 -w 1280 -h 720 -fps 15 -b 1000000 -o - | ncat -lkv4 5001
oh.dae.su
  • 934
  • 1
  • 5
  • 12
Ahmer
  • 43
  • 5

1 Answers1

1

Here I am assuming you followed the linked tutorial:
As you already have created the shell script launcher.sh that is executed after startup, you could simply add the command you want to execute (raspivid ...) to the shell script.
Put it before or after the python command depending on your needs. And take care of running the first command in the background in case they are supposed to run in parallel.

oh.dae.su
  • 934
  • 1
  • 5
  • 12