Suppose for python script name is monitor
. use following steps:
copy monitor script in
/usr/local/bin/
(not necessary)Also add a copy in
/etc/init.d/
Then execute following command to make it executable
sudo -S chmod "a+x" "/etc/init.d/monitor"
At last run update.rc command
sudo -S update-rc.d "monitor" "defaults" "98"
this will execute you monitor
whenever you login for all tty
.