Difference between revisions of "Service Manager Scripting Variables"
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The following variables are available in the '''Before Started''', '''After Started''', '''Before Stopped''' and '''After Stopped''' events. | The following variables are available in the '''Before Started''', '''After Started''', '''Before Stopped''' and '''After Stopped''' events. | ||
− | ; | + | ; ThisService_CustomVariableName |
− | ; | + | ; ThisService_Affinity |
− | ; | + | ; ThisService_CommandLineArguments |
− | ; | + | ; ThisService_CustomPort1 |
− | ; | + | ; ThisService_CustomPort2 |
− | ; | + | ; ThisService_CustomPort3 |
− | ; | + | ; ThisService_CustomPort4 |
− | ; | + | ; ThisService_CustomPort5 |
− | ; | + | ; ThisService_Description |
− | ; | + | ; ThisService_Executable |
− | ; | + | ; ThisService_FriendlyName |
− | ; | + | ; ThisService_GamePort |
− | ; | + | ; ThisService_ServiceId |
− | ; | + | ; ThisService_InteractWithDesktop |
− | ; | + | ; ThisService_IpAddress |
− | ; | + | ; ThisService_ManagedInput |
− | ; | + | ; ThisService_ManagedOutput |
− | ; | + | ; ThisService_Owner |
− | ; | + | ; ThisService_Priority |
− | ; | + | ; ThisService_QueryPort |
− | ; | + | ; ThisService_RConPort |
− | ; | + | ; ThisService_RootDirectory |
− | ; | + | ; ThisService_Slots |
− | ; | + | ; ThisService_StartOnCPU0 |
− | ; | + | ; ThisService_Startup |
− | ; | + | ; ThisService_StopCommands |
− | ; | + | ; ThisService_StopCommandWait |
− | ; | + | ; ThisService_StopDelay |
− | ; | + | ; ThisService_WorkingDirectory |
+ | ; ThisService_RunAsUserName | ||
+ | The following variables are available in the '''After Started''', '''Before Stopped''' and '''After Stopped''' events. | ||
+ | ; ThisService_Pid | ||
+ | : Id of the process that was started/stopped. | ||
− | + | ; ThisServiceController | |
− | + | : In Iron Python and C# scripts there is a variable named ThisServiceController. This can be used to read and update values in the game server's TCAdmin2\Monitor\Services\ServiceId\Service.cfg. For example: | |
− | + | commandline = ThisServiceController.ServiceConfig["Service.CommandLineArguments"] |
Latest revision as of 21:28, 13 June 2021
The following variables are available in the Before Started, After Started, Before Stopped and After Stopped events.
- ThisService_CustomVariableName
- ThisService_Affinity
- ThisService_CommandLineArguments
- ThisService_CustomPort1
- ThisService_CustomPort2
- ThisService_CustomPort3
- ThisService_CustomPort4
- ThisService_CustomPort5
- ThisService_Description
- ThisService_Executable
- ThisService_FriendlyName
- ThisService_GamePort
- ThisService_ServiceId
- ThisService_InteractWithDesktop
- ThisService_IpAddress
- ThisService_ManagedInput
- ThisService_ManagedOutput
- ThisService_Owner
- ThisService_Priority
- ThisService_QueryPort
- ThisService_RConPort
- ThisService_RootDirectory
- ThisService_Slots
- ThisService_StartOnCPU0
- ThisService_Startup
- ThisService_StopCommands
- ThisService_StopCommandWait
- ThisService_StopDelay
- ThisService_WorkingDirectory
- ThisService_RunAsUserName
The following variables are available in the After Started, Before Stopped and After Stopped events.
- ThisService_Pid
- Id of the process that was started/stopped.
- ThisServiceController
- In Iron Python and C# scripts there is a variable named ThisServiceController. This can be used to read and update values in the game server's TCAdmin2\Monitor\Services\ServiceId\Service.cfg. For example:
commandline = ThisServiceController.ServiceConfig["Service.CommandLineArguments"]