Can't start script via screen command

时间:2016-08-23 15:33:34

标签: bash

I have a script, and I want to make it work in background after boot. Therefore, I added the command below into rc.local. However, it doesn't work.

sudo -iu executerroot screen -dmS test bash -c "bash /home/pi/FileServer/Run; exec bash"

Also I've tried commands in https://askubuntu.com/questions/261899/run-a-screen-session-on-boot-from-rc-local site but no one worked for me. If I execute

sudo -iu executerroot screen -dmS test bash -c "bash /home/pi/FileServer/RunRR; exec bash"

I get this:

bash: /home/pi/FileServer/RunRR/: No such file or directory

while it doesn't work for real files. When I type "screen -r" I get just blank bash screen if a file exists.

I can't figure out why it doesn't work. Please explain why it happens and how can I solve this. Thanks...

0 个答案:

没有答案