I know how to fork to process. That is not a problem. But my issue is a little different. Example inittab line:
::respawn:-/usr/bin/python /path/to/script.py && /bin/sh -l -c 'chown user1:user1 /tmp/file'
As far as I know this works for normal situations. But this python script is a long-run process. As it doesn't end, the second part of line is not executed. At least that's what I thought. '/tmp/file' is created by this python script. That's why I am trying to use one line. As soon as python script restarted, I should change ownership of the mentioned file. I can hear you saying 'change the script'. So true. It is not that hard. But I am eager to know how to do that with inittab or something else?
Edit: Is there a way to run this python script with another user than root within inittab?
I am using a busybox installation.