Closed KoumaMisna closed 5 years ago
Have you tried calling a script instead of the server executable? You can point to a script by changing the "Executable" setting on the settings page.
Hi!
But how will I then run the actual server?
Mikko
ma 22. lokak. 2018 klo 13.46 Marvin Blum (notifications@github.com) kirjoitti:
Have you tried calling a script instead of the server executable? You can point to a script by changing the "Executable" setting on the settings page.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/assetto-corsa-web/acweb/issues/53#issuecomment-431790512, or mute the thread https://github.com/notifications/unsubscribe-auth/Ap2X2CVZDNFPiMW2RKCVGAWBa14IubQ5ks5unaHugaJpZM4XKLQa .
Call it from the script :)
Are there any available parameters for the arguments? Example to pass in some informations like instance number?
Would be great for automatic reloading stracker.
The server config and entry list are passed to the executable (like acserver -c config.ini -e entrylist.ini). So if you place a script instead of the server executable you can use these parameters to start the server by yourself. acweb uses the process ID created by that call to manage the instance. Inside the script you could run the server by starting a new process and use that process ID for stracker.
The issue here is that I'm not running a server by myself right now, so I'm not a user of my own product anymore. If you're going to test this and get it to work (or modify the acweb code to your needs, shouldn't be too hard), please consider sharing your experience here so that we can document how to run stracker (or any other mod/plugin).
You know what. I'm gonna take a look at implementing additional script calls.
Alright, I've added a simple method to run scripts before/after the server instance is created. You simply add the full qualified script path in the instance UI when you start a new server instance. The second script, which is called after the actual server start, receives the process ID of the server instance.
Please close this ticket if this solves your issue.
Could be a new tab which has a dynamic table where you can add shell script locations and run them via a button. This is useful for example now if I restart a instance I have to login to host machine via SSH and restart stracker manually because it must be started after AC server.
And stage 2 would be so that you would have a drop down menu in configurations where you could define scripts that should be run after instance start and after instance start.