norukid

i can script restarting the server

7 posts in this topic

It is possible that the server restart  only with sqf ,but we have to modify a orignal script file of Exile.

orignal: ExileServer_system_process_preInit.sqf

17 _MySql_connection = [] call ExileServer_system_database_connect;
18 if !(_MySql_connection) exitWith
19 {
20     "extDB2" callExtension "9:SHUTDOWN";
21    false
22 };

modify:ExileServer_system_process_preInit.sqf

17 ExileServerDatabaseSessionId = uiNamespace getVariable ["DataBaseSessionId",""];
18 if(ExileServerDatabaseSessionId == "") then {
19     _MySql_connection = [] call ExileServer_system_database_connect;
20    if !(_MySql_connection) exitWith
21    {
22         "extDB2" callExtension "9:SHUTDOWN";
23        false
24    };
25    uiNamespace setVariable ["DataBaseSessionId",ExileServerDatabaseSessionId];
26 }else {
27    format ["for server restarting, reuse database session id:%1",ExileServerDatabaseSessionId] call ExileServer_util_log;
28 };

use serverCommand "#restart" when would restart the server.

Each update of Exile,I don't want to modify. In next update please merge this modification.

thank you for reading my poor English.

Edited by norukid

Share this post


Link to post
Share on other sites
Advertisement

you have to comment out the 9:LOCK first, and then you can use 9:SHUTDOWN

it is right as extdb2,but not is important.

i don't want to change an original as much as possible, so you should change there so that you like it.

Share this post


Link to post
Share on other sites
 

 

it is right as extdb2,but not is important.

i don't want to change an original as much as possible, so you should change there so that you like it.

Oh,did i misunderstand it? did you mean ext2 have to be shutdown after unlock?

If it is so I don't yet try it.

Edited by norukid

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.