Or you can do this:
put your server in ( this is an example, you can put the server anywhere) : /home/yourserverfolder/ here is all the folders (gameserver, login, community..)
then,
nano start-gameserver
and put these commands in it:
cd /home/yourserverfolder/gameserver/ && ./startGameServer.sh
screen -A -m -d -S l2game tail -f /home/yourserverfolder/gameserver/log/stdout.log
then save ctrl+x y .
chmod +x start-gameserver
run file with command: ./start-gameserver
then you can see the log with this command screen -r l2game
same with loginserver..
nano start-login
and put these commands in it:
cd /home/yourserverfolder/login/ && ./startLoginServer.sh
screen -A -m -d -S l2login tail -f /home/yourserverfolder/login/log/stdout.log
then save ctrl+x y .
chmod +x start-login
run file with command: ./start-login
Please correct me if i wrong with something, because i use this for my server.