
Stark
Member-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Downloads
Everything posted by Stark
-
Luis solved this quickly for me. Solution:
-
Yes, I did follow the instructions. I simply don't understand why it wouldn't work, with a brand spanking new database and OS installation.
-
Interestingly enough, it's the default script (I haven't added this, came like this with TCA). As far as I can see, I see nothing wrong? import clr; import System; clr.AddReference("TCAdmin.SDK") from System import String, Environment, PlatformID; from System.IO import Path, File; from System.Diagnostics import Process; from System.Threading import Thread; from TCAdmin.SDK.Misc import WebClient; from TCAdmin.SDK import MonitorConfiguration; from TCAdmin.SDK.Objects import Server; #-- Download suggested default permissions and virtual server settings for ATHPs #-- https://support.teamspeakusa.com/index.php?/Knowledgebase/Article/View/318/0/how-do-i-prevent-customers-from-increasing-their-slots wc = WebClient(); wc.DownloadFile("http://media.teamspeak.com/literature/defaults.sql", Path.Combine(ThisService.RootDirectory, "sql/defaults.sql")); #-- Set serveradmin password if Environment.OSVersion.Platform == PlatformID.Win32NT : p = Process(); p.StartInfo.FileName=ThisService.Executable; p.StartInfo.Arguments=String.Format("serveradmin_password={0} create_default_virtualserver=0 logappend=1 no_password_dialog=1", ThisService.Variables["RConPassword"]); p.StartInfo.WorkingDirectory=ThisService.WorkingDirectory; p.Start(); Thread.Sleep(5000); if not p.HasExited : p.Kill(); else: runas=ThisService.GetServiceCredentials().User; p = Process(); p.StartInfo.FileName="chown"; p.StartInfo.Arguments=String.Format("--recursive {0}:{0} {1}", runas, ThisService.WorkingDirectory); p.Start(); p.WaitForExit(); p = Process(); p.StartInfo.FileName="su"; p.StartInfo.Arguments=String.Format("{0} -c\"./ts3server_startscript.sh start serveradmin_password={1} create_default_virtualserver=0 logappend=1 no_password_dialog=1\"", runas, ThisService.Variables["RConPassword"]); p.StartInfo.WorkingDirectory=ThisService.WorkingDirectory; p.Start(); p.WaitForExit(); Thread.Sleep(5000); p = Process(); p.StartInfo.FileName=Path.Combine(ThisService.WorkingDirectory, "ts3server_startscript.sh"); p.StartInfo.Arguments="stop"; p.StartInfo.WorkingDirectory=ThisService.WorkingDirectory; p.Start(); p.WaitForExit(); #-- Add master server's IP to whitelist if needed if not ThisService.ServerId.Equals(MonitorConfiguration.MasterServerId) : File.AppendAllText(Path.Combine(ThisService.WorkingDirectory, "query_ip_whitelist.txt"), Environment.NewLine + Server.GetServerFromCache(MonitorConfiguration.MasterServerId).PrimaryIp); Now, ignoring execution error of the script gets me slightly further, but I do meet a somewhat similar issue. Executing event scripts for AfterCreate Game has 4 scripts. Executing event: AfterCreate Executing script 'Download defaults.sql and set serveradmin password'. An error occurred while executing the script with game id 104 and script id 2. Error: System.ComponentModel.Win32Exception: The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at Microsoft.Scripting.Utils.InvokeHelper`2.Invoke(Object arg0) at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.CallWithInstance(Object[] args, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.<>c__DisplayClass8.<MakeBuiltinFunctionDelegate>b__2(Object[] callArgs, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`1.Call0(CallSite site, CodeContext context, TFuncType func) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.RunInstructions(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at TCAdmin.SDK.Scripting.Engines.IronPythonEngine.Execute(Credentials credentials) at TCAdmin.SDK.Scripting.ScriptEngineManager.Execute() at TCAdmin.GameHosting.SDK.Objects.GameScript.ExecuteEventScripts(ScriptEngineManager scriptEngineManager, ServiceEvent eventScript, ObjectList scripts) Configuring the game service An error occurred. Time to clean up. (CreateGameServer) Deleting the service with id 2 from the database Game has 4 scripts. Executing event: AfterDelete The file C:\TCAFiles\Users\admin\2\ts3server_win64.exe does not exist System.IO.FileNotFoundException: The file C:\TCAFiles\Users\admin\2\ts3server_win64.exe does not exist File name: 'C:\TCAFiles\Users\admin\2\ts3server_win64.exe' at TCAdmin.GameHosting.Automation.AutomationProcesses.?() at TCAdmin.GameHosting.Automation.AutomationProcesses.Start() at TCAdmin.TaskScheduler.ModuleApi.StepBase.Start(Object arguments)
-
Hey there! Due to complete data failure, I've had to reinstall TCAdmin and whatnot. Now, after the reinstall, I cannot seem to create a TS3 server. After having set TCA in debug mode, this is what I see in the console: (SNIP---Copy ALL the files!) Writing the configuration files Writing the config file C:\TCAFiles\Users\stark\2\ts3server.ini Wrote the config file C:\TCAFiles\Users\stark\2\ts3server.ini Writing the config file C:\TCAFiles\Users\stark\2\query_ip_whitelist.txt Wrote the config file C:\TCAFiles\Users\stark\2\query_ip_whitelist.txt Executing event scripts for AfterCreate Game has 4 scripts. Executing event: AfterCreate Executing script 'Download defaults.sql and set serveradmin password'. [b]An error occurred. Time to clean up. (CreateGameServer)[/b] Deleting the service with id 2 from the database Game has 4 scripts. Executing event: AfterDelete The system cannot find the file specified System.ComponentModel.Win32Exception: The system cannot find the file specified at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.CallWithInstance(Object[] args, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.<>c__DisplayClass8.<MakeBuiltinFunctionDelegate>b__2(Object[] callArgs, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`1.Call0(CallSite site, CodeContext context, TFuncType func) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.RunInstructions(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at TCAdmin.SDK.Scripting.Engines.IronPythonEngine.Execute(Credentials credentials) at TCAdmin.SDK.Scripting.ScriptEngineManager.Execute() at TCAdmin.GameHosting.SDK.Objects.GameScript.ExecuteEventScripts(ScriptEngineManager scriptEngineManager, ServiceEvent eventScript, ObjectList scripts) at TCAdmin.GameHosting.Automation.AutomationProcesses.?() at TCAdmin.GameHosting.Automation.AutomationProcesses.Start() at TCAdmin.TaskScheduler.ModuleApi.StepBase.Start(Object arguments) Any ideas as to why this is happening? Would it be a problem that I'm currently running things on Windows Server 2016?
-
Hello! After a lot of testing (and I mean *a lot*), I can confirm that the Script.WriteToConsole("^C") does not work on Windows and Conan Exiles. From the Steam community, I see many server "managers" use AutoHotKey to find a named process and use AHK to send CTRL-C to the server window. I, personally, don't see this as a very viable method when you're hosting multiple servers on the same box. I've also looked at Python's documentation, and in 2.7 there's something called os.kill() which is supported on Windows, where it uses the application PID and a signal called "signal.CTRL_C_EVENT". But I haven't gotten this to quite work either -- I'm only being tossed errors back, but I do believe I'm on the right track to get something to work here. Anyone else looked at this?
-
Hello there! Is there an object (like ThisService) that supply the PID of a service I can use in a script (for said service)? Thanks for any answers.
-
Cheers \o Thanks for the tip, but from what I can see, it doesn't seem to be working well for me. Is there a way we can get the service PID from some variable somewhere? If so, it'd be possible to use os.kill(pid, signal.CTRL_C_EVENT).
-
Hit up the Game Query Tool in the system settings. Enter your IP and query port (default 27015). Protocol: Half-Life 2 new. Test it. That should give you the information you need. If it works, just update your profile accordingly.
-
To move to a different issue. As we know, TCAdmin simply kills the process (since we have nowhere to shove in a stop command). However, if you open the process with "Show Interactive Service" from the desktop (assuming you have the setting "Enable interact with desktop" enabled in the game profile) and press CTRL+C, it'll initiate a soft-shutdown of the service which will write the last changes to the DB before it actually shuts down properly/safely (instead of being killed and losing ~5-10 minutes and having the possibility of corrupting the save). Is there any way we can send that CTRL+C signal to the service with TCAdmin to initiate this graceful shutdown of the service?
-
Hello Community! I was wondering if anyone had a basic OpenTTD (openttd.org) template they would be willing to share. I've been attempting to create my own to no avail, so I am now turning to you. To me, it doesn't really matter if it's a Linux/Debian or Windows (or both, which would be preferred). Thank you for your help!