Closed ghost closed 10 years ago
If you check your /var/log/boot.log
does it say:
* CraftBukkit was not already running. Starting...
* Using map named "world"...
Cannot make directory '/var/run/screen': Permission denied
If so, this is a long-standing bug in Ubuntu's init:
I had asked someone else via email to try adding the following sleep 1
to the script to work around it.
Change this:
echo " * Using map named \"$WORLDNAME\"..."
as_user "cd \"$MCPATH\" && screen -c /dev/null -dmS $SCRNAME $INVOCATION"
sleep 10
To this:
echo " * Using map named \"$WORLDNAME\"..."
sleep 1 ## this is the addition
as_user "cd \"$MCPATH\" && screen -c /dev/null -dmS $SCRNAME $INVOCATION"
sleep 10
But I received no reply from that person.
If you see that Permission denied
in boot.log
, could you please try adding the sleep 1
as above?
Thank you, but I haven't : Cannot make directory '/var/run/screen': Permission denied But :
And the Script don't start with Ubuntu with "sleep 1"
I am not sure. Try adding the sleep 1
as described above.
Nope, it doesn't work if I add "sleep 1".
I spent the day figuring out a work around for this on my own Ubuntu 14.04 server. What I ended up doing was essentially removing and replicating the screen-cleanup init script in the minecraft init script, right before screen is called in mc_start. The problem seems to be that /var/run/screen isn't being created before the minecraft init script tries to use screen. It may not be the best solution but it works as it should now. Here's what I did:
Interesting, thanks for reporting that. I'm really hesitant to start messing with other initscripts but I will look into this more when I get a chance.
i'm also affected by this ubuntu screen bug. I did what juhbobbleton above suggests but there's a typo in his command for moving the screen-cleanup init script, it should read (missing the 'n') mv /etc/init.d/screen-cleanup ~/screen-cleanup.bak
Hello. (I'm sorry for my English, I'm french) Thank you for this script, but it didn't start with Ubuntu. It works with a manual command ("minecraft start"). Have you an Idea ?