linux - See stdout of python script running through rc.local -
inorder run python script @ ubuntu startup, wrote command in rc.local file as
/usr/bin/python path/to/my/script.py exit 0
my script.py has print statements. wanted know can see them while script being executed @ background. tried putting
exec 2> /tmp/rc.local.log exec 1>&2 set -x
at top, din't show in rc.local.log except sequence in bash commands got executed.
i tried writing in rc.local /usr/bin/python path/to/my/script.py > /some/log.txt &
din't work out either.
so how see print statements of python script running in background via rc.local?
Comments
Post a Comment