add a new location for Russia#57
Conversation
|
I use systemD to run node smoothly, maybe someone knows how to improve it or is it good too? |
|
mm why not but the name is a little bit too long, "MindCup Russia" is better no? |
|
yes, I know, the practice for the user is their own service, but there is nothing on this machine, and unfortunately I did not study linux well, logging into the same ssh with a key, as indicated by the hoster (from whom I rented a VDS) |
|
let's do this, you tell me how to do it in linux os - I'll do it and run it, fortunately there are enough resources |
|
XD you absolutely want to put contry+region. For moment the region is useless, you just need to name your server Node name+country. |
|
And for your service you can create a new user by doing "adduser claj", and then change the root user into your service, by claj. also you can move the server to the opt folder by doing "mkdit /opt/claj; mv /root/claj-server.jar /opt/claj", and then change the working directory to that one. And to finish, set the permissions by doing "chow claj:claj -R /opt/claj". This should work. |
|
systemctl status claj.service
|
|
it is usually customary to specify the region in Russia, because it happens that in the east (Kamchatka/border with China) the US ping is less than in Russia itself on the border of Finland (west / St. Petersburg) |
|
is it possible to run it somehow but with access to the console? but not through tmux/screen solutions? |
|
@lapin-b can you help about that? you done the same thing. |
@TOWUK Yes you can. According to systemd's docs, you create a .socket file with the same name of the server (that would be The "socket" file: # New file at /etc/systemd/system/claj.socket
[Unit]
Description = Socket to communicate with claj.service
[Socket]
ListenFIFO=/run/claj.fifo
# The FIFO (named pipe) is not removed when the socket exits
ExecStopPost = /bin/rm -f /run/claj.fifo
SocketUser=claj
SocketGroup=rootThen you add the following contents after the StandardInput=socket
StandardOutput=journal
StandardError=journalTo interact with the server standard input, you write things into # Write stuff into the named pipe, wait for a little bit, get the output from the journal
echo rooms > /run/claj.fifo ; sleep 0.1 ; journalctl --no-pager -eu claj |
436b577 to
daeb123
Compare
|
commits squashed, i accept. |
okay, thanks, I'll try to maintain stability and availability, as well as update the claj server build approximately every 2 weeks (locally build on a PC from the current repository and upload to the server) |
|
I also studied the issue of interaction with AI, and he told me how to do it using the above method with a socket: /etc/systemd/system/claj.socket : /etc/systemd/system/claj.service : /usr/local/bin/claj : chmod +x /usr/local/bin/claj + crontab -e |
server based on 4c75f4b commit (Jun 19)