First of all make a private server yourself,to protect the public (main) server.
and add this code to the private server's lua.
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("say","s") function s(id,txt) if txt=="start" then os.execute("pkill server1")--- destination os.execute("screen -s /root/cs2d-vps1/server1") --destination end end
Be careful both of the dedicated name should be unique!
And start the private server (should be pw protected).
The pw should be only known by ur friends etc..
When ur main server go off/dosed,ur friends or anyone else could type the "start" command and make the server online
Note:if u type the cmd twice then the server will be added twice!
If theres any way to identify if the server is on i will be able to use this automatically
Maybe its possible with the "ps aux" command.
But i d k how it will work.. etc.
This can also makes it more easier to start various servers with different cmds.
Thanks and Regards
Ajmin
edited 2×, last 02.03.15 08:34:07 am