Help with autostart please? :) - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Discussion (https://forum.cuberite.org/forum-5.html) +--- Thread: Help with autostart please? :) (/thread-2382.html) |
RE: Help with autostart please? :) - Rekuen - 02-26-2016 (02-26-2016, 07:27 AM)Utking Wrote: when i write sudo su - minecraft -c 'tmux new -d "/home/pi/Server/Cuberite" ' I've some scripts to stop , start, restart, and update cuberite server based on jenkins builds, also works as a service and autostarts on boot, so you can simply type for example, "sudo service cuberite restart" in order to restart the server, it also sends the exit command through the server , not just kill the process to stop it among other things, like warning online users that ther server is going to restart for mainenance(update) in 5 minutes, with a reminder every minute until it restarts and updates itself. I'm using screen though , no tmux , let me know if you want them, I'm using an Odroid XU4 now, so I have to check the old Pi, I'm sure I have them on some sd card. RE: Help with autostart please? :) - Utking - 02-26-2016 (02-26-2016, 07:59 AM)Rekuen Wrote:(02-26-2016, 07:27 AM)Utking Wrote: when i write sudo su - minecraft -c 'tmux new -d "/home/pi/Server/Cuberite" ' That would have been be awesome!! RE: Help with autostart please? :) - Schwertspize - 02-26-2016 Btw is the issue fixed that the server shuts itself down if you have no stdin? Please, fix that. RE: Help with autostart please? :) - sphinxc0re - 02-26-2016 @Schwertspize stop hijacking this post RE: Help with autostart please? :) - Schwertspize - 02-26-2016 I thought this is a ~~post~~ thread about autostarting cuberite. Thid issue is related because if it is fixed, there are more convenient ways of running cuberite (and automagically starting and restarting) RE: Help with autostart please? :) - LogicParrot - 02-26-2016 (02-26-2016, 07:27 AM)Utking Wrote: when i write sudo su - minecraft -c 'tmux new -d "/home/pi/Server/Cuberite" ' Try "tmux attach" after running that. Does it connect you to the console? RE: Help with autostart please? :) - LogicParrot - 02-26-2016 Quote:No, the worlds and configuration files will be placed in the current directory, not the directory where the binary is located. Unless tmux is being strange, that's what should happen?@Schwertspize @bearbin, Okay, I will edit the guide. Edit: So, @Utking, try this in a terminal: su - minecraft -c 'tmux new -d "cd PATH && ./Cuberite" ', where PATH is the full path, as discussed before. If you get no output at all, try "tmux attach" and see if that attaches you to the console. RE: Help with autostart please? :) - Schwertspize - 02-26-2016 Additional note. If you are root, you cannot attach to a tmux of user minecraft. Either su to minecraft and then tmux a (short form) or su - minecraft -c 'tmux a' RE: Help with autostart please? :) - LogicParrot - 02-27-2016 (02-26-2016, 10:14 PM)Schwertspize Wrote: Additional note. If you are root, you cannot attach to a tmux of user minecraft. Either su to minecraft and then tmux a (short form) or su - minecraft -c 'tmux a' That's completely correct. Sorry. RE: Help with autostart please? :) - LogicParrot - 02-27-2016 Perhaps we should have a daemon mode startup flag for the Linux Cuberite? |