Skip to main content
Execute in background
Source Link
Will
  • 371
  • 4
  • 17

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line: /path/to/file.py & to /etc/rc.local, with sudo privileges, swapping/etc/rc.local before the exit 0 line (swapping /path/to/file.py with the path to your script). This will make your python script execute at the end of boot.

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line: /path/to/file.py & to /etc/rc.local, with sudo privileges, swapping /path/to/file.py with the path to your script. This will execute at the end of boot.

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line /path/to/file.py & to /etc/rc.local before the exit 0 line (swapping /path/to/file.py with the path to your script). This will make your python script execute at the end of boot.

Rollback to Revision 1 - Edit approval overridden by post owner or moderator
Source Link
Will
  • 371
  • 4
  • 17

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line: /path/to/file.py to /etc/rc.local before the exit 0& lineto (swapping/etc/rc.local, with sudo privileges, swapping /path/to/file.py with the path to your script). This will make your python script execute at the end of boot.

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line /path/to/file.py to /etc/rc.local before the exit 0 line (swapping /path/to/file.py with the path to your script). This will make your python script execute at the end of boot.

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line: /path/to/file.py & to /etc/rc.local, with sudo privileges, swapping /path/to/file.py with the path to your script. This will execute at the end of boot.

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line: /path/to/file.py & to /etc/rc.local, with sudo privileges, swapping/etc/rc.local before the exit 0 line (swapping /path/to/file.py with the path to your script). This will make your python script execute at the end of boot.

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line: /path/to/file.py & to /etc/rc.local, with sudo privileges, swapping /path/to/file.py with the path to your script. This will execute at the end of boot.

To use a .py file, just put the line #!/usr/bin/python at the very start of your file. Then make it executable with chmod +x filename. Next, add the line /path/to/file.py to /etc/rc.local before the exit 0 line (swapping /path/to/file.py with the path to your script). This will make your python script execute at the end of boot.

Source Link
Will
  • 371
  • 4
  • 17
Loading