From 96eda14b7a1caff77da000a9a957b20ab1a1bb6e Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 8 Nov 2016 15:49:56 +1000 Subject: Lots of hacking up the scripts to work with the new setup, and more. --- config/Robust.ini | 825 ------------------------------------------ config/Robust.ini.template | 777 +++++++++++++++++++++++++++++++++++++++ scripts/backup-inventories.sh | 42 +++ scripts/backup-inventory | 1 + scripts/backup-sims.sh | 30 ++ scripts/fix_var_run.sh | 6 + scripts/gitAR.sh | 118 ++++++ scripts/opensim-crontab.txt | 16 + scripts/opensim-monit.conf | 36 ++ scripts/opensim.tmux.conf | 46 +++ scripts/show-console | 3 + scripts/start-sim | 152 ++++++++ 12 files changed, 1227 insertions(+), 825 deletions(-) delete mode 100644 config/Robust.ini create mode 100644 config/Robust.ini.template create mode 100755 scripts/backup-inventories.sh create mode 120000 scripts/backup-inventory create mode 100755 scripts/backup-sims.sh create mode 100755 scripts/fix_var_run.sh create mode 100755 scripts/gitAR.sh create mode 100644 scripts/opensim-crontab.txt create mode 100644 scripts/opensim-monit.conf create mode 100644 scripts/opensim.tmux.conf create mode 100755 scripts/show-console create mode 100755 scripts/start-sim diff --git a/config/Robust.ini b/config/Robust.ini deleted file mode 100644 index 9926ed7..0000000 --- a/config/Robust.ini +++ /dev/null @@ -1,825 +0,0 @@ -; * Run -; * $ Robust.exe -inifile Robust.HG.ini -; * - -; * Configurations for enabling HG1.5 -; * -; * HG1.5 handlers are: OpenSim.Server.Handlers.dll:GatekeeperService -; * OpenSim.Server.Handlers.dll:UserAgentService -; * Additional OpenSim.Server.Handlers.dll:AssetServiceConnector and -; * OpenSim.Server.Handlers.dll:XInventoryInConnector -; * are started in port 8002, outside the firewall -; * -; ** -; * -; * The Const section allows us to define some basic information that we -; * will use throughout our configuration. We will provide examples for -; * setting the base url of the Robust server and the public and private ports -; * it uses. Changing the values of the constants will set the operating -; * parameters thoughout the configuration. Other constants that may prove -; * to be useful may be added to the followin section. They may be -; * referenced anywhere in the configuration by using ${Const|Name}. One -; * such use is providing a base path for setting locations that Robust -; * uses to write data. -; * - -[Includes] - ; Define your server specific constants in this file. -; Include-Common = /opt/opensim/config/constants.ini - - -[Const] - MOTD = "Welcome to virtual 'Gabba." - - Base = "../.." - AssetsPath = "../../AssetFiles" - CachePath = "../../caches" - ConfigPath = "../../config" - IncludePath = "../../config-include" - - GridName = "onefangWorld" - - ; For a grid these will usually be the externally accessible IP/DNS - ; name and use default public port 8002 and default private port 8003 - ; For a standalone this will usually be the externally accessible IP/DNS - ; name and use default public port 9000. The private port is not used - ; in the configuration for a standalone. - - ;# {BaseURL} {} {BaseURL} {"http://example.com" "http://127.0.0.1"} "http://127.0.0.1" - HostName = "localhost" - BaseURL = http://127.0.0.1 - - ;# {PublicPort} {} {PublicPort} {8002 9000} "8002" - PublicPort = "8002" - - ;# {PrivatePort} {} {PrivatePort} {8003} "8003" - PrivatePort = "8003" - - - DataProvider = "OpenSim.Data.MySQL.dll" - ConnectionString = "Data Source=localhost;Database=$MYSQL_DB;User ID=$MYSQL_USER;Password=$MYSQL_PASSWORD;Old Guids=true;" - -; * The startup section lists all the connectors to start up in this server -; * instance. This may be only one, or it may be the entire server suite. -; * Multiple connectors should be separated by commas. -; * -; * These are the IN connectors the server uses, the in connectors -; * read this config file and load the needed service and database connectors -; * -; * The full syntax of a connector string is: -; * [[@]/][:] -; * -[Startup] - ; Place to create a PID file - ; If no path if specified then a PID file is not created. - PIDFile = "/var/run/opensim/ROBUST.pid" - - ; Plugin Registry Location - ; Set path to directory for plugin registry. Information - ; about the registered repositories and installed plugins - ; will be stored here - ; The Robust.exe process must have R/W access to the location - RegistryLocation = "${Const|CachePath}" - - ; Modular configurations - ; Set path to directory for modular ini files... - ; The Robust.exe process must have R/W access to the location, and it must NOT be shared by the OpenSim.exe process, coz that confuses things. - ConfigDirectory = "${Const|ConfigPath}/ROBUST" - - ; Console commands can be saved to a file, so the command history persists after a restart. (default is true) - ConsoleHistoryFileEnabled = true - - ; The history file can be just a filename (relative to OpenSim's bin/ directory - ; or it can be a full path to somewhere else. (default is OpenSimConsoleHistory.txt in bin/) - ConsoleHistoryFile = "RobustConsoleHistory.txt" - - ; How many lines of command history should we keep? (default is 100) - ConsoleHistoryFileLines = 100 - - -[ServiceList] - AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" - InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector" - ;; Uncomment if you have set up Freeswitch (see [FreeswitchService] below) - ;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector" - GridServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridServiceConnector" - GridInfoServerInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" - AuthenticationServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" -; OpenIdServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:OpenIdServerConnector" - AvatarServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AvatarServiceConnector" - LLLoginServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector" - PresenceServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:PresenceServiceConnector" - UserAccountServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:UserAccountServiceConnector" - GridUserServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridUserServiceConnector" - AgentPreferencesServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AgentPreferencesServiceConnector" - FriendsServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:FriendsServiceConnector" - MapAddServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MapAddServiceConnector" - MapGetServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:MapGetServiceConnector" - ;; Uncomment this if you want offline IM to work - OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector" - ;; Uncomment this if you want Groups V2 to work - GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector" - ;; Uncomment to provide bakes caching - BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector" - - ;; Additions for Hypergrid - - GatekeeperServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector" - UserAgentServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserAgentServerConnector" - HeloServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:HeloServiceInConnector" - HGFriendsServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:HGFriendsServerConnector" - InstantMessageServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:InstantMessageServerConnector" - HGInventoryServiceConnector = "HGInventoryService@${Const|PublicPort}/OpenSim.Server.Handlers.dll:XInventoryInConnector" - HGAssetServiceConnector = "HGAssetService@${Const|PublicPort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" - ;; Uncomment this if you want Groups V2, HG to work - HGGroupsServiceConnector = "${Const|PublicPort}/OpenSim.Addons.Groups.dll:HGGroupsServiceRobustConnector" - - ;; Uncomment for UserProfiles see [UserProfilesService] to configure... - UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector" - - ;; Uncomment if you want to have centralized estate data - ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" - -; * This is common for all services, it's the network setup for the entire -; * server instance, if none is specified above -; * -[Network] - port = ${Const|PrivatePort} - - ; HTTPS for "Out of band" management applications such as the remote admin - ; module. May specify https_main = True to make the main http server - ; use https or "False" to make the main server HTTP - ; https_main = False - ; - ; Create https_listener = "True" will create a listener on the port - ; specified. Provide the path to your server certificate along with it's - ; password - ; https_listener = False - ; - ; Set our listener to this port - ; https_port = 0 - ; - ; Path to X509 certificate - ; cert_path = "path/to/cert.p12" - ; - ; Password for cert - ; cert_pass = "password" - - ;; The follow 3 variables are for HTTP Basic Authentication for the Robust services. - ;; Use this if your central services in port ${Const|PrivatePort} need to be accessible on the Internet - ;; but you want to protect them from unauthorized access. - ; AuthType = "BasicHttpAuthentication" - ; HttpAuthUsername = "some_username" - ; HttpAuthPassword = "some_password" - ;; - ;; AuthType above can be overriden in any of the service sections below by - ; AuthType = "None" - ;; This is useful in cases where you want to protect most of the services, - ;; but unprotect individual services. Username and Password can also be - ;; overriden if you want to use different credentials for the different services. - ;; Hypergrid services are not affected by this; they are publicly available - ;; by design. - - ;; By default, scripts are not allowed to call private services via llHttpRequest() - ;; Such calls are detected by the X-SecondLife-Shared HTTP header - ;; If you allow such calls you must be sure that they are restricted to very trusted scripters - ;; (remember scripts can also be in visiting avatar attachments). - ;; This can be overriden in individual private service sections if necessary - AllowllHTTPRequestIn = false - - ; * The following are for the remote console - ; * They have no effect for the local or basic console types - ; * Leave commented to diable logins to the console - ;ConsoleUser = Test - ;ConsolePass = secret - ;ConsolePort = 0 - - -[Hypergrid] - ;# {HomeURI} {Hypergrid} {The Home URL of this world} {} - ;; This is the address of the external robust server that - ;; runs the UserAgentsService, possibly this server. - ;; For example http://myworld.com:8002 - ;; This is a default that can be overwritten in some sections. - HomeURI = "${Const|BaseURL}:${Const|PublicPort}" - - ;# {GatekeeperURI} {Hypergrid} {The URL of the gatekeeper of this world} {} - ;; This is the address of the external robust server - ;; that runs the Gatekeeper service, possibly this server. - ;; For example http://myworld.com:8002 - ;; This is a default that can be overwritten in some sections. - GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" - -[AccessControl] - ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} - ;; Bar (|) separated list of viewers which may gain access to the regions. - ;; One can use a substring of the viewer name to enable only certain - ;; versions - ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" - ;; - "Imprudence" has access - ;; - "Imprudence 1.3" has access - ;; - "Imprudence 1.3.1" has no access - ; AllowedClients = "" - - ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {} - ;; Bar (|) separated list of viewers which may not gain access to the regions. - ;; One can use a Substring of the viewer name to disable only certain - ;; versions - ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" - ;; - "Imprudence" has no access - ;; - "Imprudence 1.3" has no access - ;; - "Imprudence 1.3.1" has access - ; DeniedClients = "" - -[DatabaseService] - ; PGSQL - ; Uncomment these lines if you want to use PGSQL storage - ; Change the connection string to your db details - ;StorageProvider = "OpenSim.Data.PGSQL.dll" - ;ConnectionString = "Server=localhost;Database=opensim;User Id=opensim; password=***;" - - ; MySQL - ; Uncomment these lines if you want to use MySQL storage - ; Change the connection string to your db details - StorageProvider = "${Const|DataProvider}" - ConnectionString = "${Const|ConnectionString}" - - -; * As an example, the below configuration precisely mimicks the legacy -; * asset server. It is read by the asset IN connector (defined above) -; * and it then loads the OUT connector (a local database module). That, -; * in turn, reads the asset loader and database connection information -; * -[AssetService] - - ;; Choose an asset service (Only one option should be enabled) - ; When changing this, change [HGAssetService] below to match. - ;LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" - LocalServiceModule = "OpenSim.Services.FSAssetService.dll:FSAssetConnector" - - ;; FSAsset Directories. Base directory, where final asset files are stored and Spool directory for temp files - ;; These directories must be on the same physical filesystem - BaseDirectory = "${Const|AssetsPath}/data" - SpoolDirectory = "${Const|AssetsPath}/tmp" - - ;; Original service can be checked if FSAssets can not find an asset - FallbackService = "OpenSim.Services.AssetService.dll:AssetService"; - - ;; How many days since last updating the access time before its updated again by FSAssets when accessing an asset - ;; Reduces DB calls if asset is requested often. Default value 0 will always update access time - DaysBetweenAccessTimeUpdates = 1 - - ;; FSAssets Custom Database Config (Leave blank to use grids default database configuration) - ;StorageProvider = "" - ;ConnectionString = "" - ;Realm = "fsassets" - - ;; The following are common to both the default asset service and FSAsset service - - ;; Common asset service options - DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" - AssetLoaderArgs = "./assets/AssetSets.xml" - - ; Allow maptile assets to remotely deleted by remote calls to the asset service. - ; There is no harm in having this as false - it just means that historical maptile assets are not deleted. - ; This only applies to maptiles served via the version 1 viewer mechanisms - ; Default is false - AllowRemoteDelete = false - - ; Allow all assets to be remotely deleted. - ; Only set this to true if you are operating a grid where you control all calls to the asset service - ; (where a necessary condition is that you control all simulators) and you need this for admin purposes. - ; If set to true, AllowRemoteDelete = true is required as well. - ; Default is false. - AllowRemoteDeleteAllTypes = false - - -; * This configuration loads the inventory server modules. It duplicates -; * the function of the legacy inventory server -; * -[InventoryService] - LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService" - - ; Will calls to purge folders (empty trash) and immediately delete/update items or folders (not move to trash first) succeed? - ; If this is set to false then some other arrangement must be made to perform these operations if necessary. - AllowDelete = true - - -; * This is the new style grid service. -; * "Realm" is the table that is used for user lookup. -; * It defaults to "regions", which uses the legacy tables -; * -[GridService] - LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" - - ; Realm = "regions" - ; AllowDuplicateNames = "True" - - ;; Needed to display non-default map tile images for linked regions - AssetService = "OpenSim.Services.AssetService.dll:AssetService" - - ;; Next, we can specify properties of regions, including default and fallback regions - ;; The syntax is: Region_ = "" - ;; or: Region_ = "" - ;; where can be DefaultRegion, DefaultHGRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut, Reservation, NoMove, Authenticate - ;; - ;; DefaultRegion If a local login cannot be placed in the required region (e.g. home region does not exist, avatar is not allowed entry, etc.) - ;; then this region becomes the destination. Only the first online default region will be used. If no DefaultHGRegion - ;; is specified then this will also be used as the region for hypergrid connections that require it (commonly because they have not specified - ;; an explicit region. - ;; - ;; DefaultHGRegion If an avatar connecting via the hypergrid does not specify a region, then they are placed here. Only the first online - ;; region will be used. - ;; - ;; FallbackRegion If the DefaultRegion is not available for a local login, then any FallbackRegions are tried instead. These are tried in the - ;; order specified. This only applies to local logins at this time, not Hypergrid connections. - ;; - ;; NoDirectLogin A hypergrid user cannot directly connect to this region. This does not apply to local logins. - ;; - ;; Persistent When the simulator is shutdown, the region is signalled as offline but left registered on the grid. - ;; - ;; Example specification: - ; Region_Welcome_Area = "DefaultRegion, FallbackRegion" - ; (replace spaces with underscore) - Region_residential = "DefaultRegion, FallbackRegion, Persistent" - Region_Gabba_Ward = "DefaultRegion, FallbackRegion, Persistent" - Region_Mater_Hospital = "DefaultRegion, FallbackRegion, Persistent" - Region_Mater_Private_Hospital = "DefaultRegion, FallbackRegion, Persistent" - - ;; Allow Hyperlinks to be created at the console - HypergridLinker = true - - ;; Allow supporting viewers to export content - ;; Set to false to prevent export - ExportSupported = true - - ;; If you have this set under [Hypergrid], no need to set it here, leave it commented - ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" - - -; * This is the configuration for the freeswitch server in grid mode -[FreeswitchService] -; LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService" - - ;; The IP address of your FreeSWITCH server. - ;; This address must be reachable by viewers. - ; ServerAddress = 127.0.0.1 - - ;; The following configuration parameters are optional - - ;; By default, this is the same as the ServerAddress - ; Realm = 127.0.0.1 - - ;; By default, this is the same as the ServerAddress on port 5060 - ; SIPProxy = 127.0.0.1:5060 - - ;; Default is 5000ms - ; DefaultTimeout = 5000 - - ;; The dial plan context. Default is "default" - ; Context = default - - ;; Currently unused - ; UserName = freeswitch - - ;; Currently unused - ; Password = password - - ;; The following parameters are for STUN = Simple Traversal of UDP through NATs - ;; See http://wiki.freeswitch.org/wiki/NAT_Traversal - ;; stun.freeswitch.org is not guaranteed to be running so use it in - ;; production at your own risk - ; EchoServer = 127.0.0.1 - ; EchoPort = 50505 - ; AttemptSTUN = false - - -; * This is the new style authentication service. Currently, only MySQL -; * is implemented. -; * -[AuthenticationService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" - ; Realm = "useraccounts" - - ;; Allow the service to process HTTP getauthinfo calls. - ;; Default is false. - ; AllowGetAuthInfo = false - - ;; Allow the service to process HTTP setauthinfo calls. - ;; Default is false. - ; AllowSetAuthInfo = false - - ;; Allow the service to process HTTP setpassword calls. - ;; Default is false. - ; AllowSetPassword = false - - -[OpenIdService] - ; for the server connector -; AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" -; UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" - - -; * This is the new style user service. -; * "Realm" is the table that is used for user lookup. -; * It defaults to "useraccounts", which uses the new style. -; * Realm = "users" will use the legacy tables as an authentication source -; * -[UserAccountService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" - ; Realm = "useraccounts" - - ; These are for creating new accounts by the service - AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" - PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" - GridService = "OpenSim.Services.GridService.dll:GridService" - InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService" - AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" - GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" - - ;; This switch creates the minimum set of body parts and avatar entries for a viewer 2 - ;; to show a default "Ruth" avatar rather than a cloud for a newly created user. - ;; Default is false - CreateDefaultAvatarEntries = true - - ;; Allow the service to process HTTP createuser calls. - ;; Default is false. - ; AllowCreateUser = false - - ;; Allow the service to process HTTP setaccount calls. - ;; Default is false. - ; AllowSetAccount = false - - -[GridUserService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService" - - -[AgentPreferencesService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.UserAccountService.dll:AgentPreferencesService" - - -[PresenceService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" - ; Set this to true to allow the use of advanced web services and multiple - ; bots using one account - AllowDuplicatePresences = false; - - -[AvatarService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService" - - -[FriendsService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.FriendsService.dll:FriendsService" - -[EstateService] - LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" - -[LibraryService] - LibraryName = "OpenSim Library" - DefaultLibrary = "./inventory/Libraries.xml" - - -[LoginService] - ; for the server connector - LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService" - ; for the service - UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" - GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" - AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" - InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService" - AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" - PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" - GridService = "OpenSim.Services.GridService.dll:GridService" - SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector" - LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService" - UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" - FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" - - ; This inventory service will be used to initialize the user's inventory - HGInventoryServicePlugin = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService" - HGInventoryServiceConstructorArg = "HGInventoryService" - - ;; Ask co-operative viewers to use a different currency name - Currency = "v " - - ;; Set minimum fee to publish classified - ; ClassifiedFee = 0 - - WelcomeMessage = "${Const|MOTD}" - AllowRemoteSetLoginLevel = "false" - - ; For V2 map - MapTileURL = "${Const|BaseURL}:${Const|PublicPort}/"; - - ; Url to search service - ; SearchURL = "${Const|BaseURL}:${Const|PublicPort}/"; - - ; For V3 destination guide - ; DestinationGuide = "${Const|BaseURL}/guide" - - ; For V3 avatar picker (( work in progress )) - ; AvatarPicker = "${Const|BaseURL}/avatars" - - ; If you run this login server behind a proxy, set this to true - ; HasProxy = false - - ; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs) - ;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented - ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" - - SRV_HomeURI = "${Const|BaseURL}:${Const|PublicPort}" - SRV_InventoryServerURI = "${Const|BaseURL}:${Const|PublicPort}" - SRV_AssetServerURI = "${Const|BaseURL}:${Const|PublicPort}" - SRV_ProfileServerURI = "${Const|BaseURL}:${Const|PublicPort}" - SRV_FriendsServerURI = "${Const|BaseURL}:${Const|PublicPort}" - SRV_IMServerURI = "${Const|BaseURL}:${Const|PublicPort}" - SRV_GroupsServerURI = "${Const|BaseURL}:${Const|PublicPort}" - - ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" - ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time - ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not. - ;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids. - ;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST. - ;; Options are - ;; "none" no DST - ;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour. - ;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings. - ;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows - DSTZone = "local" - - ;Basic Login Service Dos Protection Tweaks - ;; - ;; Some Grids/Users use a transparent proxy that makes use of the X-Forwarded-For HTTP Header, If you do, set this to true - ;; If you set this to true and you don't have a transparent proxy, it may allow attackers to put random things in the X-Forwarded-For header to - ;; get around this basic DOS protection. - ;DOSAllowXForwardedForHeader = false - ;; - ;; The protector adds up requests during this rolling period of time, default 10 seconds - ;DOSRequestTimeFrameMS = 10000 - ;; - ;; The amount of requests in the above timeframe from the same endpoint that triggers protection - ;DOSMaxRequestsInTimeFrame = 5 - ;; - ;; The amount of time that a specific endpoint is blocked. Default 2 minutes. - ;DOSForgiveClientAfterMS = 120000 - ;; - ;; To turn off basic dos protection, set the DOSMaxRequestsInTimeFrame to 0. - - -[MapImageService] - LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" - - ; Set this if you want to change the default - ; TilesStoragePath = "maptiles" - ; - ; If for some reason you have the AddMapTile service outside the firewall (e.g. ${Const|PublicPort}), - ; you may want to set this. Otherwise, don't set it, because it's already protected. - ; GridService = "OpenSim.Services.GridService.dll:GridService" - ; - ; Additionally, if you run this server behind a proxy, set this to true - ; HasProxy = false - - -[GridInfoService] - ; These settings are used to return information on a get_grid_info call. - ; Client launcher scripts and third-party clients make use of this to - ; autoconfigure the client and to provide a nice user experience. If you - ; want to facilitate that, you should configure the settings here according - ; to your grid or standalone setup. - ; - ; See http://opensimulator.org/wiki/GridInfo - - ; login uri: for grid this is the login server URI - login = ${Const|BaseURL}:${Const|PublicPort}/ - - ; long grid name: the long name of your grid - gridname = "${Const|GridName}" - - ; short grid name: the short name of your grid - gridnick = "${Const|GridName}" - - ; login page: optional: if it exists it will be used to tell the client to use - ; this as splash page - ;welcome = ${Const|BaseURL}/welcome - - ; helper uri: optional: if it exists it will be used to tell the client to use - ; this for all economy related things - ;economy = ${Const|BaseURL}/economy - - ; web page of grid: optional: page providing further information about your grid - ;about = ${Const|BaseURL}/about - - ; account creation: optional: page providing further information about obtaining - ; a user account on your grid - ;register = ${Const|BaseURL}/register - - ; help: optional: page providing further assistance for users of your grid - ;help = ${Const|BaseURL}/help - - ; password help: optional: page providing password assistance for users of your grid - ;password = ${Const|BaseURL}/password - - ; HG address of the gatekeeper, if you have one - ; this is the entry point for all the regions of the world - ; gatekeeper = ${Const|BaseURL}:${Const|PublicPort}/ - - ; HG user domain, if you have one - ; this is the entry point for all user-related HG services - ; uas = ${Const|BaseURL}:${Const|PublicPort}/ - - -[GatekeeperService] - LocalServiceModule = "OpenSim.Services.HypergridService.dll:GatekeeperService" - ;; for the service - UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" - UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" - PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" - GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" - GridService = "OpenSim.Services.GridService.dll:GridService" - AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector" - SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector" - ; how does the outside world reach me? This acts as public key too. - ;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented - ; ExternalName = "${Const|BaseURL}:${Const|PublicPort}" - - ; Does this grid allow incoming links to any region in it? - ; If false, HG TPs happen only to the Default regions specified in [GridService] section - AllowTeleportsToAnyRegion = true - - ; If you run this gatekeeper server behind a proxy, set this to true - ; HasProxy = false - - ;; Are foreign visitors allowed? - ForeignAgentsAllowed = true - ;; - ;; If ForeignAgentsAllowed is true, make exceptions using AllowExcept. - ;; Leave blank or commented for no exceptions. - ; AllowExcept = "http://griefer.com:8002, http://enemy.com:8002" - ;; - ;; If ForeignAgentsAllowed is false, make exceptions using DisallowExcept - ;; Leave blank or commented for no exceptions. - ; DisallowExcept = "http://myfriendgrid.com:8002, http://myboss.com:8002" - - -[UserAgentService] - LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService" - ;; for the service - GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" - GridService = "OpenSim.Services.GridService.dll:GridService" - GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService" - PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" - FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" - UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" - - ; If you run this user agent server behind a proxy, set this to true - ; HasProxy = false - - ;; If you separate the UserAgentService from the LoginService, set this to - ;; the IP address of the machine where your LoginService is - ;LoginServerIP = "127.0.0.1" - - ; User level required to be contacted from other grids - LevelOutsideContacts = 0 - - ;; Restrictions on destinations of local users. - ;; Are local users allowed to visit other grids? - ;; What user level? Use variables of this forrm: - ;; ForeignTripsAllowed_Level_ = true | false - ;; (the default is true) - ;; For example: - ; ForeignTripsAllowed_Level_0 = false - ; ForeignTripsAllowed_Level_200 = true ; true is default, no need to say it - ;; - ;; If ForeignTripsAllowed is false, make exceptions using DisallowExcept - ;; Leave blank or commented for no exceptions. - ; DisallowExcept_Level_0 = "http://myothergrid.com:8002, http://boss.com:8002" - ;; - ;; If ForeignTripsAllowed is true, make exceptions using AllowExcept. - ;; Leave blank or commented for no exceptions. - ; AllowExcept_Level_200 = "http://griefer.com:8002, http://enemy.com:8002" - - ;; This variable controls what is exposed to profiles of local users - ;; as seen from outside of this grid. Leave it uncommented for exposing - ;; UserTitle, UserFlags and the creation date. Uncomment and change to False - ;; to block this info from being exposed. - ; ShowUserDetailsInHGProfile = True - - -; * The interface that local users get when they are in other grids. -; * This restricts the inventory operations while in other grids. -; * Still not completely safe, especially if users perform inventory operations -; * while in those grids. The more the user accesses his/her inventory, the more -; * those simulators will know about the user's inventory. -; * -[HGInventoryService] - ; For the InventoryServiceInConnector - LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService" - ;; alternatives: - ;; HG1.5, more permissive, not recommended, but still supported - ;LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInventoryService" - ;; HG1.0, totally permissive, not recommended, but OK for grids with 100% trust - ;LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService" - - UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" - AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" - - ; HGInventoryService is a public-facing inventory service that allows users to - ; interact with their suitcase folder when on a foreign grid. This reuses the general inventory service connector. - ; Hence, if the user has set up authentication in [Network] to protect their private services - ; make sure it is not set here. - AuthType = None - - ;; Can overwrite the default in [Hypergrid], but probably shouldn't - ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" - - -; * The interface that local users get when they are in other grids. -; * This restricts the access that the rest of the world has to -; * the assets of this world. -; * -[HGAssetService] -; LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService" - LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFSAssetService" - UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" - - ; HGAssetService is a public-facing service that allows users to - ; read and create assets when on another grid. This reuses the general asset service connector. - ; Hence, if the user has set up authentication in [Network] to protect their private services - ; make sure it is overriden for this public service. - AuthType = None - - ;; Can overwrite the default in [Hypergrid], but probably shouldn't - ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" - - ;; The asset types that this grid can export to / import from other grids. - ;; Comma separated. - ;; Valid values are all the asset types in OpenMetaverse.AssetType, namely: - ;; Unknown, Texture, Sound, CallingCard, Landmark, Clothing, Object, Notecard, LSLText, - ;; LSLBytecode, TextureTGA, Bodypart, SoundWAV, ImageTGA, ImageJPEG, Animation, Gesture, Mesh - ;; - ;; Leave blank or commented if you don't want to apply any restrictions. - ;; A more strict, but still reasonable, policy may be to disallow the exchange - ;; of scripts, like so: - ; DisallowExport ="LSLText" - ; DisallowImport ="LSLBytecode" - - -[HGFriendsService] - LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFriendsService" - UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" - FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" - UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" - GridService = "OpenSim.Services.GridService.dll:GridService" - PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" - - -[HGInstantMessageService] - LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" - GridService = "OpenSim.Services.GridService.dll:GridService" - PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" - UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" - ; This should always be true in the Robust config - InGatekeeper = True - - -[Messaging] - ; OfflineIM - OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService" - - -[Groups] - ;; for the HG Groups service - OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService" - UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" - - ;; What is the HomeURI of users associated with this grid? - ;; Can overwrite the default in [Hypergrid], but probably shouldn't - ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" - - ;; Sets the maximum number of groups an agent may join - MaxAgentGroups = 420 - - -[UserProfilesService] - LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" - Enabled = true - ;; Configure this for separate profiles database - ;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;" - ;; Realm = UserProfiles - UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService - AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" - - -[BakedTextureService] - LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" - ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. - BaseDirectory = "bakes" diff --git a/config/Robust.ini.template b/config/Robust.ini.template new file mode 100644 index 0000000..1bbccd5 --- /dev/null +++ b/config/Robust.ini.template @@ -0,0 +1,777 @@ +; * Run +; * $ Robust.exe -inifile Robust.HG.ini +; * + +; * Configurations for enabling HG1.5 +; * +; * HG1.5 handlers are: OpenSim.Server.Handlers.dll:GatekeeperService +; * OpenSim.Server.Handlers.dll:UserAgentService +; * Additional OpenSim.Server.Handlers.dll:AssetServiceConnector and +; * OpenSim.Server.Handlers.dll:XInventoryInConnector +; * are started in port 8002, outside the firewall + + +; * The startup section lists all the connectors to start up in this server +; * instance. This may be only one, or it may be the entire server suite. +; * Multiple connectors should be separated by commas. +; * +; * These are the IN connectors the server uses, the in connectors +; * read this config file and load the needed service and database connectors +; * +; * The full syntax of a connector string is: +; * [[@]/][:] +; * +[Startup] + ; Place to create a PID file + ; If no path if specified then a PID file is not created. + PIDFile = "/var/run/opensim/ROBUST.pid" + + ; Plugin Registry Location + ; Set path to directory for plugin registry. Information + ; about the registered repositories and installed plugins + ; will be stored here + ; The Robust.exe process must have R/W access to the location + RegistryLocation = "${Const|CachePath}" + + ; Modular configurations + ; Set path to directory for modular ini files... + ; The Robust.exe process must have R/W access to the location, and it must NOT be shared by the OpenSim.exe process, coz that confuses things. + ConfigDirectory = "${Const|ConfigPath}/ROBUST" + + ; Console commands can be saved to a file, so the command history persists after a restart. (default is true) + ConsoleHistoryFileEnabled = true + + ; The history file can be just a filename (relative to OpenSim's bin/ directory + ; or it can be a full path to somewhere else. (default is OpenSimConsoleHistory.txt in bin/) + ConsoleHistoryFile = "RobustConsoleHistory.txt" + + ; How many lines of command history should we keep? (default is 100) + ConsoleHistoryFileLines = 100 + + +[ServiceList] + AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" + InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector" + ;; Uncomment if you have set up Freeswitch (see [FreeswitchService] below) + ;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector" + GridServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridServiceConnector" + GridInfoServerInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" + AuthenticationServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" +; OpenIdServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:OpenIdServerConnector" + AvatarServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AvatarServiceConnector" + LLLoginServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector" + PresenceServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:PresenceServiceConnector" + UserAccountServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:UserAccountServiceConnector" + GridUserServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridUserServiceConnector" + AgentPreferencesServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AgentPreferencesServiceConnector" + FriendsServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:FriendsServiceConnector" + MapAddServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MapAddServiceConnector" + MapGetServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:MapGetServiceConnector" + ;; Uncomment this if you want offline IM to work + OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector" + ;; Uncomment this if you want Groups V2 to work + GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector" + ;; Uncomment to provide bakes caching + BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector" + + ;; Additions for Hypergrid + + GatekeeperServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector" + UserAgentServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserAgentServerConnector" + HeloServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:HeloServiceInConnector" + HGFriendsServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:HGFriendsServerConnector" + InstantMessageServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:InstantMessageServerConnector" + HGInventoryServiceConnector = "HGInventoryService@${Const|PublicPort}/OpenSim.Server.Handlers.dll:XInventoryInConnector" + HGAssetServiceConnector = "HGAssetService@${Const|PublicPort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" + ;; Uncomment this if you want Groups V2, HG to work + HGGroupsServiceConnector = "${Const|PublicPort}/OpenSim.Addons.Groups.dll:HGGroupsServiceRobustConnector" + + ;; Uncomment for UserProfiles see [UserProfilesService] to configure... + UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector" + + ;; Uncomment if you want to have centralized estate data + ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" + +; * This is common for all services, it's the network setup for the entire +; * server instance, if none is specified above +; * +[Network] + port = ${Const|PrivatePort} + + ; HTTPS for "Out of band" management applications such as the remote admin + ; module. May specify https_main = True to make the main http server + ; use https or "False" to make the main server HTTP + ; https_main = False + ; + ; Create https_listener = "True" will create a listener on the port + ; specified. Provide the path to your server certificate along with it's + ; password + ; https_listener = False + ; + ; Set our listener to this port + ; https_port = 0 + ; + ; Path to X509 certificate + ; cert_path = "path/to/cert.p12" + ; + ; Password for cert + ; cert_pass = "password" + + ;; The follow 3 variables are for HTTP Basic Authentication for the Robust services. + ;; Use this if your central services in port ${Const|PrivatePort} need to be accessible on the Internet + ;; but you want to protect them from unauthorized access. + ; AuthType = "BasicHttpAuthentication" + ; HttpAuthUsername = "some_username" + ; HttpAuthPassword = "some_password" + ;; + ;; AuthType above can be overriden in any of the service sections below by + ; AuthType = "None" + ;; This is useful in cases where you want to protect most of the services, + ;; but unprotect individual services. Username and Password can also be + ;; overriden if you want to use different credentials for the different services. + ;; Hypergrid services are not affected by this; they are publicly available + ;; by design. + + ;; By default, scripts are not allowed to call private services via llHttpRequest() + ;; Such calls are detected by the X-SecondLife-Shared HTTP header + ;; If you allow such calls you must be sure that they are restricted to very trusted scripters + ;; (remember scripts can also be in visiting avatar attachments). + ;; This can be overriden in individual private service sections if necessary + AllowllHTTPRequestIn = false + + ; * The following are for the remote console + ; * They have no effect for the local or basic console types + ; * Leave commented to diable logins to the console + ;ConsoleUser = Test + ;ConsolePass = secret + ;ConsolePort = 0 + + +[Hypergrid] + ;# {HomeURI} {Hypergrid} {The Home URL of this world} {} + ;; This is the address of the external robust server that + ;; runs the UserAgentsService, possibly this server. + ;; For example http://myworld.com:8002 + ;; This is a default that can be overwritten in some sections. + HomeURI = "${Const|BaseURL}:${Const|PublicPort}" + + ;# {GatekeeperURI} {Hypergrid} {The URL of the gatekeeper of this world} {} + ;; This is the address of the external robust server + ;; that runs the Gatekeeper service, possibly this server. + ;; For example http://myworld.com:8002 + ;; This is a default that can be overwritten in some sections. + GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" + +[AccessControl] + ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} + ;; Bar (|) separated list of viewers which may gain access to the regions. + ;; One can use a substring of the viewer name to enable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has access + ;; - "Imprudence 1.3" has access + ;; - "Imprudence 1.3.1" has no access + ; AllowedClients = "" + + ;# {DeniedClients} {} {Bar (|) separated list of denied clients} {} + ;; Bar (|) separated list of viewers which may not gain access to the regions. + ;; One can use a Substring of the viewer name to disable only certain + ;; versions + ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" + ;; - "Imprudence" has no access + ;; - "Imprudence 1.3" has no access + ;; - "Imprudence 1.3.1" has access + ; DeniedClients = "" + +[DatabaseService] + ; PGSQL + ; Uncomment these lines if you want to use PGSQL storage + ; Change the connection string to your db details + ;StorageProvider = "OpenSim.Data.PGSQL.dll" + ;ConnectionString = "Server=localhost;Database=opensim;User Id=opensim; password=***;" + + ; MySQL + ; Uncomment these lines if you want to use MySQL storage + ; Change the connection string to your db details + StorageProvider = "${Const|DataProvider}" + ConnectionString = "${Const|ConnectionString}" + + +; * As an example, the below configuration precisely mimicks the legacy +; * asset server. It is read by the asset IN connector (defined above) +; * and it then loads the OUT connector (a local database module). That, +; * in turn, reads the asset loader and database connection information +; * +[AssetService] + + ;; Choose an asset service (Only one option should be enabled) + ; When changing this, change [HGAssetService] below to match. + ;LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" + LocalServiceModule = "OpenSim.Services.FSAssetService.dll:FSAssetConnector" + + ;; FSAsset Directories. Base directory, where final asset files are stored and Spool directory for temp files + ;; These directories must be on the same physical filesystem + BaseDirectory = "${Const|AssetsPath}/data" + SpoolDirectory = "${Const|AssetsPath}/tmp" + + ;; Original service can be checked if FSAssets can not find an asset + FallbackService = "OpenSim.Services.AssetService.dll:AssetService"; + + ;; How many days since last updating the access time before its updated again by FSAssets when accessing an asset + ;; Reduces DB calls if asset is requested often. Default value 0 will always update access time + DaysBetweenAccessTimeUpdates = 1 + + ;; FSAssets Custom Database Config (Leave blank to use grids default database configuration) + ;StorageProvider = "" + ;ConnectionString = "" + ;Realm = "fsassets" + + ;; The following are common to both the default asset service and FSAsset service + + ;; Common asset service options + DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" + AssetLoaderArgs = "./assets/AssetSets.xml" + + ; Allow maptile assets to remotely deleted by remote calls to the asset service. + ; There is no harm in having this as false - it just means that historical maptile assets are not deleted. + ; This only applies to maptiles served via the version 1 viewer mechanisms + ; Default is false + AllowRemoteDelete = false + + ; Allow all assets to be remotely deleted. + ; Only set this to true if you are operating a grid where you control all calls to the asset service + ; (where a necessary condition is that you control all simulators) and you need this for admin purposes. + ; If set to true, AllowRemoteDelete = true is required as well. + ; Default is false. + AllowRemoteDeleteAllTypes = false + + +; * This configuration loads the inventory server modules. It duplicates +; * the function of the legacy inventory server +; * +[InventoryService] + LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService" + + ; Will calls to purge folders (empty trash) and immediately delete/update items or folders (not move to trash first) succeed? + ; If this is set to false then some other arrangement must be made to perform these operations if necessary. + AllowDelete = true + + +; * This is the new style grid service. +; * "Realm" is the table that is used for user lookup. +; * It defaults to "regions", which uses the legacy tables +; * +[GridService] + LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" + + ; Realm = "regions" + ; AllowDuplicateNames = "True" + + ;; Needed to display non-default map tile images for linked regions + AssetService = "OpenSim.Services.AssetService.dll:AssetService" + + ;; Next, we can specify properties of regions, including default and fallback regions + ;; The syntax is: Region_ = "" + ;; or: Region_ = "" + ;; where can be DefaultRegion, DefaultHGRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut, Reservation, NoMove, Authenticate + ;; + ;; DefaultRegion If a local login cannot be placed in the required region (e.g. home region does not exist, avatar is not allowed entry, etc.) + ;; then this region becomes the destination. Only the first online default region will be used. If no DefaultHGRegion + ;; is specified then this will also be used as the region for hypergrid connections that require it (commonly because they have not specified + ;; an explicit region. + ;; + ;; DefaultHGRegion If an avatar connecting via the hypergrid does not specify a region, then they are placed here. Only the first online + ;; region will be used. + ;; + ;; FallbackRegion If the DefaultRegion is not available for a local login, then any FallbackRegions are tried instead. These are tried in the + ;; order specified. This only applies to local logins at this time, not Hypergrid connections. + ;; + ;; NoDirectLogin A hypergrid user cannot directly connect to this region. This does not apply to local logins. + ;; + ;; Persistent When the simulator is shutdown, the region is signalled as offline but left registered on the grid. + ;; + ;; Example specification: + ; Region_Welcome_Area = "DefaultRegion, FallbackRegion" + ; (replace spaces with underscore) + Region_residential = "DefaultRegion, FallbackRegion, Persistent" + Region_Gabba_Ward = "DefaultRegion, FallbackRegion, Persistent" + Region_Mater_Hospital = "DefaultRegion, FallbackRegion, Persistent" + Region_Mater_Private_Hospital = "DefaultRegion, FallbackRegion, Persistent" + + ;; Allow Hyperlinks to be created at the console + HypergridLinker = true + + ;; Allow supporting viewers to export content + ;; Set to false to prevent export + ExportSupported = true + + ;; If you have this set under [Hypergrid], no need to set it here, leave it commented + ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" + + +; * This is the configuration for the freeswitch server in grid mode +[FreeswitchService] +; LocalServiceModule = "OpenSim.Services.FreeswitchService.dll:FreeswitchService" + + ;; The IP address of your FreeSWITCH server. + ;; This address must be reachable by viewers. + ; ServerAddress = 127.0.0.1 + + ;; The following configuration parameters are optional + + ;; By default, this is the same as the ServerAddress + ; Realm = 127.0.0.1 + + ;; By default, this is the same as the ServerAddress on port 5060 + ; SIPProxy = 127.0.0.1:5060 + + ;; Default is 5000ms + ; DefaultTimeout = 5000 + + ;; The dial plan context. Default is "default" + ; Context = default + + ;; Currently unused + ; UserName = freeswitch + + ;; Currently unused + ; Password = password + + ;; The following parameters are for STUN = Simple Traversal of UDP through NATs + ;; See http://wiki.freeswitch.org/wiki/NAT_Traversal + ;; stun.freeswitch.org is not guaranteed to be running so use it in + ;; production at your own risk + ; EchoServer = 127.0.0.1 + ; EchoPort = 50505 + ; AttemptSTUN = false + + +; * This is the new style authentication service. Currently, only MySQL +; * is implemented. +; * +[AuthenticationService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" + ; Realm = "useraccounts" + + ;; Allow the service to process HTTP getauthinfo calls. + ;; Default is false. + ; AllowGetAuthInfo = false + + ;; Allow the service to process HTTP setauthinfo calls. + ;; Default is false. + ; AllowSetAuthInfo = false + + ;; Allow the service to process HTTP setpassword calls. + ;; Default is false. + ; AllowSetPassword = false + + +[OpenIdService] + ; for the server connector +; AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" +; UserAccountServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" + + +; * This is the new style user service. +; * "Realm" is the table that is used for user lookup. +; * It defaults to "useraccounts", which uses the new style. +; * Realm = "users" will use the legacy tables as an authentication source +; * +[UserAccountService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" + ; Realm = "useraccounts" + + ; These are for creating new accounts by the service + AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" + PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" + GridService = "OpenSim.Services.GridService.dll:GridService" + InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService" + AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" + GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" + + ;; This switch creates the minimum set of body parts and avatar entries for a viewer 2 + ;; to show a default "Ruth" avatar rather than a cloud for a newly created user. + ;; Default is false + CreateDefaultAvatarEntries = true + + ;; Allow the service to process HTTP createuser calls. + ;; Default is false. + ; AllowCreateUser = false + + ;; Allow the service to process HTTP setaccount calls. + ;; Default is false. + ; AllowSetAccount = false + + +[GridUserService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService" + + +[AgentPreferencesService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.UserAccountService.dll:AgentPreferencesService" + + +[PresenceService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" + ; Set this to true to allow the use of advanced web services and multiple + ; bots using one account + AllowDuplicatePresences = false; + + +[AvatarService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService" + + +[FriendsService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.FriendsService.dll:FriendsService" + +[EstateService] + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" + +[LibraryService] + LibraryName = "OpenSim Library" + DefaultLibrary = "./inventory/Libraries.xml" + + +[LoginService] + ; for the server connector + LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService" + ; for the service + UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" + AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" + InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService" + AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" + PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" + GridService = "OpenSim.Services.GridService.dll:GridService" + SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector" + LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService" + UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" + FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" + + ; This inventory service will be used to initialize the user's inventory + HGInventoryServicePlugin = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService" + HGInventoryServiceConstructorArg = "HGInventoryService" + + ;; Ask co-operative viewers to use a different currency name + Currency = "v " + + ;; Set minimum fee to publish classified + ; ClassifiedFee = 0 + + WelcomeMessage = "${Const|MOTD}" + AllowRemoteSetLoginLevel = "false" + + ; For V2 map + MapTileURL = "${Const|BaseURL}:${Const|PublicPort}/"; + + ; Url to search service + ; SearchURL = "${Const|BaseURL}:${Const|PublicPort}/"; + + ; For V3 destination guide + ; DestinationGuide = "${Const|BaseURL}/guide" + + ; For V3 avatar picker (( work in progress )) + ; AvatarPicker = "${Const|BaseURL}/avatars" + + ; If you run this login server behind a proxy, set this to true + ; HasProxy = false + + ; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs) + ;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented + ; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}" + + SRV_HomeURI = "${Const|BaseURL}:${Const|PublicPort}" + SRV_InventoryServerURI = "${Const|BaseURL}:${Const|PublicPort}" + SRV_AssetServerURI = "${Const|BaseURL}:${Const|PublicPort}" + SRV_ProfileServerURI = "${Const|BaseURL}:${Const|PublicPort}" + SRV_FriendsServerURI = "${Const|BaseURL}:${Const|PublicPort}" + SRV_IMServerURI = "${Const|BaseURL}:${Const|PublicPort}" + SRV_GroupsServerURI = "${Const|BaseURL}:${Const|PublicPort}" + + ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" + ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time + ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not. + ;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids. + ;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST. + ;; Options are + ;; "none" no DST + ;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour. + ;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings. + ;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows + DSTZone = "local" + + ;Basic Login Service Dos Protection Tweaks + ;; + ;; Some Grids/Users use a transparent proxy that makes use of the X-Forwarded-For HTTP Header, If you do, set this to true + ;; If you set this to true and you don't have a transparent proxy, it may allow attackers to put random things in the X-Forwarded-For header to + ;; get around this basic DOS protection. + ;DOSAllowXForwardedForHeader = false + ;; + ;; The protector adds up requests during this rolling period of time, default 10 seconds + ;DOSRequestTimeFrameMS = 10000 + ;; + ;; The amount of requests in the above timeframe from the same endpoint that triggers protection + ;DOSMaxRequestsInTimeFrame = 5 + ;; + ;; The amount of time that a specific endpoint is blocked. Default 2 minutes. + ;DOSForgiveClientAfterMS = 120000 + ;; + ;; To turn off basic dos protection, set the DOSMaxRequestsInTimeFrame to 0. + + +[MapImageService] + LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" + + ; Set this if you want to change the default + ; TilesStoragePath = "maptiles" + ; + ; If for some reason you have the AddMapTile service outside the firewall (e.g. ${Const|PublicPort}), + ; you may want to set this. Otherwise, don't set it, because it's already protected. + ; GridService = "OpenSim.Services.GridService.dll:GridService" + ; + ; Additionally, if you run this server behind a proxy, set this to true + ; HasProxy = false + + +[GridInfoService] + ; These settings are used to return information on a get_grid_info call. + ; Client launcher scripts and third-party clients make use of this to + ; autoconfigure the client and to provide a nice user experience. If you + ; want to facilitate that, you should configure the settings here according + ; to your grid or standalone setup. + ; + ; See http://opensimulator.org/wiki/GridInfo + + ; login uri: for grid this is the login server URI + login = ${Const|BaseURL}:${Const|PublicPort}/ + + ; long grid name: the long name of your grid + gridname = "${Const|GridName}" + + ; short grid name: the short name of your grid + gridnick = "${Const|GridName}" + + ; login page: optional: if it exists it will be used to tell the client to use + ; this as splash page + ;welcome = ${Const|BaseURL}/welcome + + ; helper uri: optional: if it exists it will be used to tell the client to use + ; this for all economy related things + ;economy = ${Const|BaseURL}/economy + + ; web page of grid: optional: page providing further information about your grid + ;about = ${Const|BaseURL}/about + + ; account creation: optional: page providing further information about obtaining + ; a user account on your grid + ;register = ${Const|BaseURL}/register + + ; help: optional: page providing further assistance for users of your grid + ;help = ${Const|BaseURL}/help + + ; password help: optional: page providing password assistance for users of your grid + ;password = ${Const|BaseURL}/password + + ; HG address of the gatekeeper, if you have one + ; this is the entry point for all the regions of the world + ; gatekeeper = ${Const|BaseURL}:${Const|PublicPort}/ + + ; HG user domain, if you have one + ; this is the entry point for all user-related HG services + ; uas = ${Const|BaseURL}:${Const|PublicPort}/ + + +[GatekeeperService] + LocalServiceModule = "OpenSim.Services.HypergridService.dll:GatekeeperService" + ;; for the service + UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" + PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" + GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" + GridService = "OpenSim.Services.GridService.dll:GridService" + AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector" + SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector" + ; how does the outside world reach me? This acts as public key too. + ;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented + ; ExternalName = "${Const|BaseURL}:${Const|PublicPort}" + + ; Does this grid allow incoming links to any region in it? + ; If false, HG TPs happen only to the Default regions specified in [GridService] section + AllowTeleportsToAnyRegion = true + + ; If you run this gatekeeper server behind a proxy, set this to true + ; HasProxy = false + + ;; Are foreign visitors allowed? + ForeignAgentsAllowed = true + ;; + ;; If ForeignAgentsAllowed is true, make exceptions using AllowExcept. + ;; Leave blank or commented for no exceptions. + ; AllowExcept = "http://griefer.com:8002, http://enemy.com:8002" + ;; + ;; If ForeignAgentsAllowed is false, make exceptions using DisallowExcept + ;; Leave blank or commented for no exceptions. + ; DisallowExcept = "http://myfriendgrid.com:8002, http://myboss.com:8002" + + +[UserAgentService] + LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService" + ;; for the service + GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" + GridService = "OpenSim.Services.GridService.dll:GridService" + GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService" + PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" + FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" + UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + + ; If you run this user agent server behind a proxy, set this to true + ; HasProxy = false + + ;; If you separate the UserAgentService from the LoginService, set this to + ;; the IP address of the machine where your LoginService is + ;LoginServerIP = "127.0.0.1" + + ; User level required to be contacted from other grids + LevelOutsideContacts = 0 + + ;; Restrictions on destinations of local users. + ;; Are local users allowed to visit other grids? + ;; What user level? Use variables of this forrm: + ;; ForeignTripsAllowed_Level_ = true | false + ;; (the default is true) + ;; For example: + ; ForeignTripsAllowed_Level_0 = false + ; ForeignTripsAllowed_Level_200 = true ; true is default, no need to say it + ;; + ;; If ForeignTripsAllowed is false, make exceptions using DisallowExcept + ;; Leave blank or commented for no exceptions. + ; DisallowExcept_Level_0 = "http://myothergrid.com:8002, http://boss.com:8002" + ;; + ;; If ForeignTripsAllowed is true, make exceptions using AllowExcept. + ;; Leave blank or commented for no exceptions. + ; AllowExcept_Level_200 = "http://griefer.com:8002, http://enemy.com:8002" + + ;; This variable controls what is exposed to profiles of local users + ;; as seen from outside of this grid. Leave it uncommented for exposing + ;; UserTitle, UserFlags and the creation date. Uncomment and change to False + ;; to block this info from being exposed. + ; ShowUserDetailsInHGProfile = True + + +; * The interface that local users get when they are in other grids. +; * This restricts the inventory operations while in other grids. +; * Still not completely safe, especially if users perform inventory operations +; * while in those grids. The more the user accesses his/her inventory, the more +; * those simulators will know about the user's inventory. +; * +[HGInventoryService] + ; For the InventoryServiceInConnector + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService" + ;; alternatives: + ;; HG1.5, more permissive, not recommended, but still supported + ;LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInventoryService" + ;; HG1.0, totally permissive, not recommended, but OK for grids with 100% trust + ;LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService" + + UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" + + ; HGInventoryService is a public-facing inventory service that allows users to + ; interact with their suitcase folder when on a foreign grid. This reuses the general inventory service connector. + ; Hence, if the user has set up authentication in [Network] to protect their private services + ; make sure it is not set here. + AuthType = None + + ;; Can overwrite the default in [Hypergrid], but probably shouldn't + ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" + + +; * The interface that local users get when they are in other grids. +; * This restricts the access that the rest of the world has to +; * the assets of this world. +; * +[HGAssetService] +; LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService" + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFSAssetService" + UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + + ; HGAssetService is a public-facing service that allows users to + ; read and create assets when on another grid. This reuses the general asset service connector. + ; Hence, if the user has set up authentication in [Network] to protect their private services + ; make sure it is overriden for this public service. + AuthType = None + + ;; Can overwrite the default in [Hypergrid], but probably shouldn't + ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" + + ;; The asset types that this grid can export to / import from other grids. + ;; Comma separated. + ;; Valid values are all the asset types in OpenMetaverse.AssetType, namely: + ;; Unknown, Texture, Sound, CallingCard, Landmark, Clothing, Object, Notecard, LSLText, + ;; LSLBytecode, TextureTGA, Bodypart, SoundWAV, ImageTGA, ImageJPEG, Animation, Gesture, Mesh + ;; + ;; Leave blank or commented if you don't want to apply any restrictions. + ;; A more strict, but still reasonable, policy may be to disallow the exchange + ;; of scripts, like so: + ; DisallowExport ="LSLText" + ; DisallowImport ="LSLBytecode" + + +[HGFriendsService] + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFriendsService" + UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" + FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" + UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + GridService = "OpenSim.Services.GridService.dll:GridService" + PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" + + +[HGInstantMessageService] + LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" + GridService = "OpenSim.Services.GridService.dll:GridService" + PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" + UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" + ; This should always be true in the Robust config + InGatekeeper = True + + +[Messaging] + ; OfflineIM + OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService" + + +[Groups] + ;; for the HG Groups service + OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService" + UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" + + ;; What is the HomeURI of users associated with this grid? + ;; Can overwrite the default in [Hypergrid], but probably shouldn't + ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" + + ;; Sets the maximum number of groups an agent may join + MaxAgentGroups = 420 + + +[UserProfilesService] + LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" + Enabled = true + ;; Configure this for separate profiles database + ;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;" + ;; Realm = UserProfiles + UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService + AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" + + +[BakedTextureService] + LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" + ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. + BaseDirectory = "bakes" diff --git a/scripts/backup-inventories.sh b/scripts/backup-inventories.sh new file mode 100755 index 0000000..642d71d --- /dev/null +++ b/scripts/backup-inventories.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Figure out where we are, most of this mess is to troll through soft links. +PRG="$0" +while [ -h "${PRG}" ] ; do + ls=$(ls -ld "${PRG}") + link=`expr "${ls}" : '.*-> \(.*\)$'` + if expr "${link}" : '.*/.*' > /dev/null; then + PRG="${link}" + else + PRG=$(dirname "${PRG}")/"${link}" + fi +done +PRGDIR=$(dirname "${PRG}") +pushd ${PRGDIR} >/dev/null +PRGDIR=$(pwd) +popd >/dev/null + +# Get the database credentials. +declare -A creds +while read -d ';' p; do + k=$(echo ${p} | cut -d '=' -f 1) + v=$(echo ${p} | cut -d '=' -f 2) + creds[${k}]="${v}" +done < <(grep ConnectionString ${PRGDIR}/../config/config.ini | cut -d '"' -f 2) +# The above seems the best way to get bash to let the creds assignments survive outside the loop. + +# Only backup those that have not logged on since their last backup, but returning prims from sims will bypass this check. +timestamp=$(ls -o --time-style="+%s" ${PRGDIR}/../backups/.keep | cut -d ' ' -f 5) +touch ${PRGDIR}/../backups/.keep + +# Get the user names, and back 'em up. +mysql --host="${creds[Data Source]}" "${creds[Database]}" --user="${creds[User ID]}" --password="${creds[Password]}" \ + -e "select FirstName,LastName from UserAccounts,GridUser where UserAccounts.PrincipalID=GridUser.UserID and GridUser.Logout>${timestamp};" -ss | while read user; do + # Replace tab with space + user=${user// / } + ${PRGDIR}/backup-inventory "${user}" + # Sleep for a while, so that there is plenty of time to do the backup, + # and we are not keeping the computer very busy if there are lots of users. + # My big arsed 1 GB OAR takes about ten minutes to create, and maybe an hour to gitIOR! + sleep 200 +done diff --git a/scripts/backup-inventory b/scripts/backup-inventory new file mode 120000 index 0000000..d326a74 --- /dev/null +++ b/scripts/backup-inventory @@ -0,0 +1 @@ +start-sim \ No newline at end of file diff --git a/scripts/backup-sims.sh b/scripts/backup-sims.sh new file mode 100755 index 0000000..fb18c18 --- /dev/null +++ b/scripts/backup-sims.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Figure out where we are, most of this mess is to troll through soft links. +PRG="$0" +while [ -h "${PRG}" ] ; do + ls=$(ls -ld "${PRG}") + link=`expr "${ls}" : '.*-> \(.*\)$'` + if expr "${link}" : '.*/.*' > /dev/null; then + PRG="${link}" + else + PRG=$(dirname "${PRG}")/"${link}" + fi +done +PRGDIR=$(dirname "${PRG}") +pushd ${PRGDIR} >/dev/null +PRGDIR=$(pwd) +popd >/dev/null + +for i in $(seq 99) +do + j=$(printf "sim%02d" $i) + if [ -e "${PRGDIR}/../config/$j" ] + then + cd ${PRGDIR}/../config/$j + ./backup-sim + # Sleep for a while, so that there is plenty of time to do the backup, + # and we are not keeping the computer very busy if there are lots of sims. + sleep 200 + fi +done diff --git a/scripts/fix_var_run.sh b/scripts/fix_var_run.sh new file mode 100755 index 0000000..97567cb --- /dev/null +++ b/scripts/fix_var_run.sh @@ -0,0 +1,6 @@ +# Create the opensim run dir. +mkdir -p /var/run/opensim +chown opensim:opensim /var/run/opensim +chmod ug+rwx /var/run/opensim +chmod o-rwx /var/run/opensim +chmod g+s /var/run/opensim diff --git a/scripts/gitAR.sh b/scripts/gitAR.sh new file mode 100755 index 0000000..2a067be --- /dev/null +++ b/scripts/gitAR.sh @@ -0,0 +1,118 @@ +#!/bin/bash + +# Work around OpenSims slow database corruption bug by using git to store all old backups. +# Try to squeeze every last byte out of the tarballs. Seems to cut the total storage size down to one third the size of just the raw I/OAR files. +# Saves even more if there's been no changes. +# On the other hand, these backup files will grow indefinately, the more changes, the faster it grows. I can live with that for more reliable backups that go back further. +# Tries to avoid loosing data if things go wrong. I think the main remaining problem would be running out of space, in which case you have bigger problems to deal with. + +# Strategy - unpack the last one, unpack and commit any old I/OARs, pack up the result, delete it's working directory, THEN run the save i/oar. +# Avoids having to sync with OpenSim finishing the current I/OAR, and as a bonus, an easy to deliver latest I/OAR for people that want it. + +# Not really meant to be called by users, so don't bother validating the input and such. + +type=$1 +title=$2 + +# Figure out where we are, most of this mess is to troll through soft links. +PRG="$0" +while [ -h "${PRG}" ] ; do + ls=$(ls -ld "${PRG}") + link=`expr "${ls}" : '.*-> \(.*\)$'` + if expr "${link}" : '.*/.*' > /dev/null; then + PRG="${link}" + else + PRG=$(dirname "${PRG}")/"${link}" + fi +done +PRGDIR=$(dirname "${PRG}") +pushd ${PRGDIR} >/dev/null +PRGDIR=$(pwd) +popd >/dev/null + +date=$(date '+%F_%T') + +# Sanitize the name. Not removing [ or ], couldn't get that to work, only important for Windows. +name=$(echo "${title}" | sed -e 's/[\\/:\*\?"<>\|@#$%&\0\x01-\x1F\x27\x40\x60\x7F. ]/_/g' -e 's/^$/NONAME/') +# Convert the type to uppercase. +gar="_git$(echo -n ${type} | tr '[:lower:]' '[:upper:]')AR" + +if [ -d ${PRGDIR}/../../backups/temp_backup${type}_${name} ]; then + echo "WARNING - Mess left over from last backup, not gonna run!" + mv ${PRGDIR}/../../backups/temp_backup${type}_${name}/*.oar ${PRGDIR}/../backups + exit 1 +fi + +mkdir -p ${PRGDIR}/../../backups/temp_backup${type}_${name} +pushd ${PRGDIR}/../../backups/temp_backup${type}_${name} >/dev/null +if [ -f ../${name}${gar}.tar.xz ]; then + nice -n 19 tar -xf ../${name}${gar}.tar.xz +else + mkdir -p ${name}${gar} + git init ${name}${gar} >log +fi + +pushd ${name}${gar} >/dev/null + +# Make sure stuff that's already compressed doesn't get compressed by git. +# Also tries to protect binaries from mangling. +cat >.gitattributes <<- zzzzEOFzzzz +*.bvh -delta -diff -text +*.jp2 -delta -diff -text +*.jpg -delta -diff -text +*.llmesh -delta -diff -text +*.ogg -delta -diff -text +*.png -delta -diff -text +*.r32 -delta -diff -text +*.tga -delta -diff -text +zzzzEOFzzzz +git add .gitattributes &>>../log +# Coz git insists. +git config user.email "opensim@$(hostname -A | cut -d ' ' -f 1)" +git config user.name "opensim" + +# Looping through them in case there's a bunch of I/OARs from previous versions of this script. +find ../.. -maxdepth 1 -type f -name ${name}-*.${type}ar | sort | while read file; do + # Deal with deletions in the inventory / sim, easy method, which becomes a nop for files that stay in the git add below. + git rm -fr * &>>../log && \ + nice -n 19 tar -xzf "${file}" || echo "ERROR - Could not unpack ${file} !" >>../errors + if [ ! -f ../errors ]; then + git add * &>>../log && git add */\* &>>../log + # Magic needed to figure out if there's anything to commit. + # After all the pain to get this to work, there's an ever changing timestamp in archive.xml that screws it up. + # Like this system didn't have enough timestamps in it already. lol + # TODO - I could sed out that timestamp, and put it back again based on the OAR file name when extracting. + # IARs don't seem to have the timestamp. + if t=$(git status --porcelain) && [ -z "${t}" ]; then + true + else + # Note this commit message has to be just the file name, as the ungitAR script uses it. + git commit -qm "$(basename ${file})" &>>../log || echo "ERROR - Could not commit ${file} !" >>../errors + fi + if [ ! -f ../errors ]; then + mv ${file} .. + fi + fi + if [ -f ../errors ]; then + exit 1 # Seems to only exit from this loop, not the script. Makes me want to rewrite this in a real language. lol + fi +done + +#git gc --aggressive --prune=now # Takes a long time, doesn't gain much. Even worse, it increases the size of the resulting tarball. lol + +popd >/dev/null + +if [ ! -f errors ]; then + XZ_OPT="-9e" nice -n 19 tar -c --xz ${name}${gar} -f ../${name}${gar}.tar.xz || echo "ERROR - Could not pack gitAR!" >>errors +fi + +popd >/dev/null + +if [ -f ${PRGDIR}/../../backups/temp_backup${type}_${name}/errors ]; then + echo "NOT cleaning up coz - " + cat ${PRGDIR}/../../backups/temp_backup${type}_${name}/errors +else + rm -fr ${PRGDIR}/../../backups/temp_backup${type}_${name} +fi + +echo -n ${name} diff --git a/scripts/opensim-crontab.txt b/scripts/opensim-crontab.txt new file mode 100644 index 0000000..f26b25d --- /dev/null +++ b/scripts/opensim-crontab.txt @@ -0,0 +1,16 @@ +# to see current crontab for opensim +# $ sudo crontab -u opensim -l +# +# to install this crontab for opensim: +# $ cat /opt/opensim/current/scripts/opensim-crontab.txt | sudo crontab -u opensim - +# +# at midnight, remove old logs, files created 3 or more days ago +#0 0 * * * find /var/log/opensim -ctime +1 -delete +# experimental version using savelog -c cycles all opensim log files over 7 days +0 0 * * * /usr/bin/savelog -c 7 /var/log/opensim/*.log > /dev/null + +# Backup the inventories and sims every 6 hours. +0 */6 * * * /opt/opensim/current/scripts/backup-sims.sh + +# Only backup inventories on the grid server itself. +#55 */6 * * * /opt/opensim/current/scripts/backup-inventories.sh diff --git a/scripts/opensim-monit.conf b/scripts/opensim-monit.conf new file mode 100644 index 0000000..7785056 --- /dev/null +++ b/scripts/opensim-monit.conf @@ -0,0 +1,36 @@ +# manage the OpenSim process for Your Sim +# +# usage: +# monit start your_sim +# monit stop your_sim +# monit restart your_sim +# +# see 'daemon' setting in /etc/monit/monitrc for the cycle length. +# on ubuntu/debian, this is overridden by the CHECK_INTERVALS var in +# /etc/default/monit . the below assumes you've set it to 30 seconds. +# +# if process dies, will restart sim within 30 seconds. if process +# dies 5 times in as many tries, will stop trying and send email +# alert. +# +# if SimFPS drops to 0 for 2 minutes, restart. +# +# if process CPU usage stays above 300% for 2 minutes, restart. +# +# see ../README for configuration instructions. +# +# Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. +# +check process sim01 with pidfile /var/run/opensim/sim01.pid + start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'" + as uid root and gid root + stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/stop-sim'" with timeout 600 seconds + if cpu usage > 50% for 4 cycles then restart +# if 5 restarts within 5 cycles then timeout +# if failed url http://127.0.0.1:9005/jsonSimStats/ +# and content != '"SimFPS":0.0,' for 4 cycles +# then restart +# if failed url http://127.0.0.1:9008/jsonSimStats/ +# and content == '"SimFPS":' for 4 cycles +# then restart + diff --git a/scripts/opensim.tmux.conf b/scripts/opensim.tmux.conf new file mode 100644 index 0000000..ecd0b04 --- /dev/null +++ b/scripts/opensim.tmux.conf @@ -0,0 +1,46 @@ +set-option -g prefix C-a +unbind-key C-b +bind-key C-a send-prefix + +# r reloads the configuration, handy +bind r source-file ~/.tmux.conf + +unbind % # Remove default binding since we’re replacing them. +bind | split-window -h +bind - split-window -v + +set-option -g bell-action any +set-option -g bell-on-alert on + +set-option -g history-limit 100000 + +set-option -g mouse-resize-pane on +set-option -g mouse-select-pane on +set-option -g mouse-select-window on +set-option -g mouse-utf8 on + +#set-option -g set-remain-on-exit on +set-option -g set-titles on +set-option -g set-titles-string '#W' + +set-option -g status-interval 1 +set-option -g status-justify centre +set-option -g status-utf8 on + +set-option -g status-left-length 80 +set-option -g status-left '[#H #S #F]' +set-option -g status-right-length 80 +set-option -g status-right '%F #(uptime)'<-----># &F is ISO date, uptime starts with the current time, and ends with the load average. B-) + +set-option -g visual-activity on +set-option -g visual-content on +set-option -g visual-silence on + +set-option -gw clock-mode-style 24 +set-option -gw mode-mouse on + +# Highlight active window +set-option -gw window-status-current-bg red + +# Set window notifications +set-option -gw monitor-activity on diff --git a/scripts/show-console b/scripts/show-console new file mode 100755 index 0000000..ddeba86 --- /dev/null +++ b/scripts/show-console @@ -0,0 +1,3 @@ +#!/bin/bash + +tmux -S /var/run/opensim/opensim-tmux.socket select-window -t "OpenSim_console" \; attach-session -t "OpenSim_console" diff --git a/scripts/start-sim b/scripts/start-sim new file mode 100755 index 0000000..cd28b43 --- /dev/null +++ b/scripts/start-sim @@ -0,0 +1,152 @@ +#!/bin/bash + +# Figure out where we are, most of this mess is to troll through soft links. +PRG="$0" +while [ -h "${PRG}" ] ; do + ls=$(ls -ld "${PRG}") + link=`expr "${ls}" : '.*-> \(.*\)$'` + if expr "${link}" : '.*/.*' > /dev/null; then + PRG="${link}" + else + PRG=$(dirname "${PRG}")/"${link}" + fi +done +PRGDIR=$(dirname "${PRG}") +pushd ${PRGDIR} >/dev/null +PRGDIR=$(pwd) +popd >/dev/null + + +USER=$(whoami) +console_name="OpenSim_console" +tmux_command="tmux -S /var/run/opensim/opensim-tmux.socket" +tmux_session=${console_name} +tmux_window="${tmux_command} select-window -t ${tmux_session}" +tmux_send="${tmux_command} send-keys -t ${tmux_session}" +bindir="${PRGDIR}/../bin" +date=$(date '+%F_%T') +quiet="" +inventory="" + +if [ $USER = "opensim" ] +then + SUDO="" +else + SUDO="sudo -Hu opensim" +fi + +if [ "$1" = "-q" ] +then + quiet="true" + shift 1 +fi + +if [ "x$1" = "x" ]; then + tgt=$(basename $(pwd)) + num=$(echo ${tgt} | cut -c 4-) +elif [ -d "./$1" ]; then + tgt=$1 +elif [ -d "./sim$1" ]; then + num=$1 + tgt="./sim${num}" +else + tgt=$1 + inventory=$1 +fi + +if [ "x$tgt" = "x" ]; then + echo "usage:" + echo " $ $(basename $0) " + echo "where is one of: " robust sim[0-9][0-9] + exit 1 +fi + +cd ${bindir} + +if ( ${tmux_command} -q list-sessions 2>/dev/null | grep -q ${console_name}: ); then + true +else + # The sudo is only so that the session is owned by opensim, otherwise it's owned by whoever ran this script, which is a likely security hole. + # After the session is created, we rely on the /var/run/opensim directory to be group sticky, so that anyone in the opensim group can attach to the tmux socket. + $SUDO ${tmux_command} new-session -d -s ${console_name} -n "Server" +fi + + +if [ "x$tgt" = "xROBUST" ]; then + exe="Robust" + title="ROBUST" +elif [ "x$inventory" = "x" ]; then + exe="OpenSim" + # Grab the first Section line of the sims .xml file, cut it down to the name. + title=$(grep "
../config/Robust.ini + ${tmux_command} split-window -vp 30 -t "${tmux_session}:" "${cmd}" + else + ${tmux_command} new-window -dn "[${title}]" -t "${tmux_session}:${num}" "${cmd}" + fi + fi + + if [ "x$quiet" = "x" ] + then + if [ "x$tgt" = "xROBUST" ]; then + ${tmux_window} \; attach-session -t "${tmux_session}" + fi + fi + ;; + + "backup-inventory") + user=$($SUDO ${PRGDIR}/gitAR.sh i "${inventory}") + # Add the full date and time to create the IAR file name. + cmd="save iar -c ${inventory} / password ${PRGDIR}/../../backups/${user}-${date}.iar" + # Do it in the highest numbered window. + ${tmux_send}:"$" "${cmd}" Enter + ${tmux_send}:"$" "force gc" Enter + ;; + + "backup-sim") + sim=$($SUDO ${PRGDIR}/gitAR.sh o "${title}") + # Add the full date and time to create the OAR file name. + cmd="save oar --all ${PRGDIR}/../../backups/${sim}-${date}.oar" + if [ -e /var/run/opensim/${tgt}.pid ]; then + ${tmux_send}:"[${title}]" "${cmd}" Enter + # Wait a bit, then generate the map tiles, coz the good generator leaks memory badly if you leave it turned on. + sleep 30 + ${tmux_send}:"[${title}]" "generate map" Enter + ${tmux_send}:"[${title}]" "force gc" Enter + else + echo "No OAR created for ${title}, it's not running." + fi + ;; + + "stop-sim") + if [ -e /var/run/opensim/${tgt}.pid ]; then + ${tmux_send}:"[${title}]" "alert WARNING - Emergency shutdown in one minute!" Enter + ${tmux_send}:"[${title}]" "alert WARNING - Emergency shutdown in one minute!" Enter + sleep 30 + ${tmux_send}:"[${title}]" "alert WARNING - Emergency shutdown in thirty seconds!" Enter + ${tmux_send}:"[${title}]" "alert WARNING - Emergency shutdown in thirty seconds!" Enter + sleep 30 + ${tmux_send}:"[${title}]" "shutdown" Enter + else + echo "Sim ${title} is not running, so not stopping." + fi + ;; +esac -- cgit v1.1