Premium DarkFire 12 Posted January 22, 2017 Premium Share Posted January 22, 2017 Hi , devs . After reboot , on my server the time is going back. How to repair this? Link to comment Share on other sites More sharing options...
Tasho 243 Posted January 22, 2017 Share Posted January 22, 2017 (edited) First one you need to kill processes and after that to do reboot. For can make all very easy, just use command: cd /usr/home/game && sh close.sh && reboot Or you can make like this: Create a file with name reboot.sh in ../usr/home/game/ Put this in him: #!/bin/sh #If processes change their name, killall may not be able to match them correctly, so change "game" or "db" with your name, type "ps" or "top" for know. echo -e "Kill processes and reboot server ..." killall game && killall db && reboot And when you want to make a reboot just type command: sh reboot.sh Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium DarkFire 12 Posted January 22, 2017 Author Premium Share Posted January 22, 2017 Ok , when i want to make reboot i will do this , but what i need to do if server crush or are some problems with host company? In that case players will lose items.. Link to comment Share on other sites More sharing options...
Ikh 35 Posted January 22, 2017 Share Posted January 22, 2017 (edited) 11 minutes ago, Tasho said: First one you need to kill processes and after that to do reboot. For can make all very easy, just use command: cd /usr/home/game && sh close.sh && reboot Or you can make like this: Create a file with name reboot.sh in ../usr/home/game/ Put this in him: #!/bin/sh #[i] If processes change their name, killall may not be able to match them correctly, so change "game" or "db" with your name, type "ps" or "top" for know. echo -e "Kill processes and reboot server ..." killall game && killall db && reboot And when you want to make a reboot just type command: sh reboot.sh You also need to wait 5-10 seconds sometimes #!/bin/sh #[i] If processes change their name, killall may not be able to match them correctly, so change "game" or "db" with your name, type "ps" or "top" for know. echo -e "Kill processes and reboot server ..." killall game db && sleep 10 && reboot You can also move reboot.sh intro /usr/local/sbin and name it simply r in this way you not need always to cd /path/to_reboot.sh you can write simply r and enter .. etc 43 minutes ago, DarkFire said: Hi , devs . After reboot , on my server the time is going back. How to repair this? Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted January 22, 2017 Premium Share Posted January 22, 2017 To restart the server you dont need to reboot the machine. Theres no need of that. Send me your shutdown script by pm and i will fix it. 1 Link to comment Share on other sites More sharing options...
Ikh 35 Posted January 22, 2017 Share Posted January 22, 2017 3 minutes ago, tierrilopes said: To restart the server you dont need to reboot the machine. Theres no need of that. Send me your shutdown script by pm and i will fix it. There is nothing to be fixed. killall name_of_game name_of_db is already enough Just remove && reboot from Tasho .sh Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted January 22, 2017 Premium Share Posted January 22, 2017 Just now, Ikh said: There is nothing to be fixed. killall name_of_game name_of_db is already enough Thats why most of pservers are crap, with "solutions" like those. 1 Link to comment Share on other sites More sharing options...
Premium DarkFire 12 Posted January 22, 2017 Author Premium Share Posted January 22, 2017 My shutdown script work fine , but i want to finde a solution for reboot Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted January 22, 2017 Premium Share Posted January 22, 2017 Check pm. 1 Link to comment Share on other sites More sharing options...
Ikh 35 Posted January 22, 2017 Share Posted January 22, 2017 1 minute ago, tierrilopes said: Thats why most of pservers are crap, with "solutions" like those. Really ? Do you know what a .killscript is ? killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent. KILL ALL don't kill the process directly / send the SIGTERM void signal_setup(void) { signal_timer_enable(30); signal(SIGVTALRM, checkpointing); signal(SIGHUP, hupsig); signal(SIGCHLD, reap); signal(SIGINT, hupsig); signal(SIGTERM, hupsig); signal(SIGPIPE, SIG_IGN); signal(SIGALRM, SIG_IGN); signal(SIGUSR1, usrsig); } SIGTERM don't close you program imediatly. Just use killall game you will see in you syslog those lines sys_log(0, "<shutdown> Shutting down CHARACTER_MANAGER..."); sys_log(0, "<shutdown> Shutting down ITEM_MANAGER..."); etc and more this means you program is shutdown correct KILLALL just send the signal , not close you program directly. Please watch you language. There are difference bettwen SEND SIGNAL and kill instant. 1 Link to comment Share on other sites More sharing options...
Ikh 35 Posted January 22, 2017 Share Posted January 22, 2017 (edited) Just now, tierrilopes said: Are you trolling yourself? Please. Before killall After killall That does not mean the program is closed directly. As you can see game is not closed because he need to close all of his threads and all runing stuffs. Destroy arenaManager Destroy ItemManager Destroy CClientManager When u see in syslog this mean there is nothing shit when using KILLALL I try to explain you because you used " SHIT " word Thank you Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium tierrilopes 452 Posted January 22, 2017 Premium Share Posted January 22, 2017 (edited) 3 minutes ago, Ikh said: Before killall After killall That does not mean the program is closed directly. As you can see game is not closed because he need to close all of his threads and all runing stuffs. Destroy arenaManager Destroy ItemManager Destroy CClientManager When u see in syslog this mean there is nothing shit when using KILLALL I try to explain you because you used " SHIT " word Thank you It seems you misunderstood what i meant and wrote. Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
terrorr 15 Posted January 23, 2017 Share Posted January 23, 2017 Reboot comand it's just if necessary or maintenance ! "shutdown -r now" enough ! Link to comment Share on other sites More sharing options...
AetherMt2 4 Posted January 23, 2017 Share Posted January 23, 2017 2 hours ago, terrorr said: Reboot comand it's just if necessary or maintenance ! "shutdown -r now" enough ! reboot is rebooting the machine. You dont need to reboot the machine just to restart the server. Consider the dedicated as your home pc, you dont restart it everytime you want to restart your browser do you? Its the same thing here. Link to comment Share on other sites More sharing options...
iltizio 217 Posted January 23, 2017 Share Posted January 23, 2017 15 hours ago, DarkFire said: Hi , devs . After reboot , on my server the time is going back. How to repair this? https://www.cyberciti.biz/faq/howto-set-date-and-time-timezone-in-freebsd/amp/ Read FreeBSD Setup Timezone 14 hours ago, DarkFire said: Ok , when i want to make reboot i will do this , but what i need to do if server crush or are some problems with host company? In that case players will lose items.. Use Aria storage engine or InnoDB for your tables. https://metin2dev.org/board/index.php?/topic/11831-install-mariadb-instead-mysql/ Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7175 Posted January 23, 2017 Honorable Member Share Posted January 23, 2017 (edited) killall game will trigger the core shutdown event, and it will take at maximum 300 seconds to save all (items, players) and then stop the game. (without - is -1 by default, -9 will force the closure losing items; e.g. killall -9 game db) After that, you can kill db. Don't ever use reboot to restart the server. It will restart the server without stopping any process. It could corrupt mysql's database as well. You should use shutdown -r now to restart. It will wait until all the processes are stopped. It usually takes 1 second though. Don't use it to safely stop metin2 since you need to stop the game cores before db, and not randomly. Edited January 23, 2017 by martysama0134 5 Check out my GitHub Link to comment Share on other sites More sharing options...
Yasuke 0 Posted May 18, 2021 Share Posted May 18, 2021 - First: shutdown from game - Second: killall game - Third: wait 10 min and killall db The following does not work. I always lose my items (i got those items executing /i xxx) Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2512 Posted May 19, 2021 Forum Moderator Share Posted May 19, 2021 11 hours ago, Yasuke said: - First: shutdown from game - Second: killall game - Third: wait 10 min and killall db The following does not work. I always lose my items (i got those items executing /i xxx) Just wait for the cache to propagate (max 7 minutes). If you want to be extra sure, just shutdown the server (you can kill the auth process), wait 7 minutes, then kill the proccesses and restart it. Gurgarath coming soon Link to comment Share on other sites More sharing options...
VirusS 0 Posted January 28 Share Posted January 28 On 1/23/2017 at 1:24 PM, martysama0134 said: killall game will trigger the core shutdown event, and it will take at maximum 300 seconds to save all (items, players) and then stop the game. (without - is -1 by default, -9 will force the closure losing items; e.g. killall -9 game db) After that, you can kill db. Don't ever use reboot to restart the server. It will restart the server without stopping any process. It could corrupt mysql's database as well. You should use shutdown -r now to restart. It will wait until all the processes are stopped. It usually takes 1 second though. Don't use it to safely stop metin2 since you need to stop the game cores before db, and not randomly. so let me understand that the things that tell the truth about certain things are deleted and you try to cover them up, I didn't think so, I wrote something and the mass was deleted, I think it should have been left there for everyone to understand that there are things that do not have the same functions Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7175 Posted January 28 Honorable Member Share Posted January 28 (edited) 5 minutes ago, VirusS said: so let me understand that the things that tell the truth about certain things are deleted and you try to cover them up, I didn't think so, I wrote something and the mass was deleted, I think it should have been left there for everyone to understand that there are things that do not have the same functions "reboot" now is "shutdown -r now". They changed the behavior in the last 7 years Edited January 28 by martysama0134 1 1 Check out my GitHub Link to comment Share on other sites More sharing options...
dsfhfsdcbc 0 Posted February 13 Share Posted February 13 (edited) du hurensohn du hurensohn to that post about the download I fooking reacted 100 times but nothing worked you fooking son of a fooking trash bitch go fuck yourself motherfucker Edited February 13 by dsfhfsdcbc Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now