문제

So I'm attempting to make a start file which launches several screens each with their respective script. Looks a bit like:

cd /home/foo/
screen -dmS foo bash -c '/run.sh'
echo Started Foo

run.sh:

#!/bin/bash
while true
do
    java -Xmx1024M -XX:MaxPermSize=256M -server -jar foo.jar -o true
    sleep 5
done;

Now if I do screen -ls right after I run it, the screen shows up. However if I check a second later, the screens gone. Am I doing something wrong or is this the typical behavior?

도움이 되었습니까?

해결책

I had to add sh to the start of the command because I didn't make it executable.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top