-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathUSAGE
165 lines (116 loc) · 9.05 KB
/
USAGE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
******************
*** Logging in ***
******************
After setting up, you'll want to login with your administrator account. To do this, go to
http://example.com/uxpanel/admin/
Then, enter your username and password (specified in config_local.php), and login.
If you are logging in as a normal user, use this link instead:
http://example.com/uxpanel/
uxpanel will restrict your access if you fail to login too many times. In that case, just wait until you can login again. Alternatively, clear the uxpanel locks table:
DELETE FROM locks;
*********************************
*** Creating a client account ***
*********************************
The administrator account does not have services. To have services, you need to create a client account. To do this, select Accounts from the admin panel, enter an email address, password, and name, and then create the account.
There are two ways to access the account. You can either morph into the new account through the admin Accounts tab, or login to the account through the normal user login page.
***********************************
*** Creating a database service ***
***********************************
This section covers how to create a database service. This applies to both existing and new services.
First, go to the Accounts tab and select the account that you wish to add the database service to. You should see an Add Service form. Enter the following:
Name: a name for the database service
Description: a description for the database service
Type: "database" (without the quotes, must be lowercase)
Identifier: the database name
Hit Add service. You should see a new service show up in the services list for the account.
Select the new service; this should take you to the Service Manager page for the database service you just created. On this page, set db_name, db_host, db_username, and db_password if these are not already correct; to do this, enter the key and a value for the key, and select Set Parameter.
For example, to set the database password to "blah", you would enter "db_password" under Key, "blah" under Value, and then select Set Parameter.
If the database doesn't exist yet, click on the "click here to do so" link that will set up the database. This will execute the install.sql file in your ghost_path directory (ghost_path is a configuration value, in config_local.php); if this file doesn't exist, uxpanel cannot set up the database automatically. Also note that the database account (db_username and db_password) must have access to create the tables in the database; additionally, the database being used must already be created:
CREATE DATABASE database_name;
GRANT ALL ON database_name TO 'user'@'localhost' IDENTIFIED BY 'blah';
********************************
*** Creating a GHost service ***
********************************
** New service **
If your ghost_path directory is set up correctly, all you need to do is to use the Add Service form on the Account Services page.
Name: a name for the GHost service
Description: a description for the database service
Type: "ghost" (without the quotes, must be lowercase)
Identifier: the directory to create inside ghost_path that will store tho service files
This will create the GHost service.
** Existing service **
For existing services, the process is more complicated. First, the service must be moved so that it is a subdirectory under the ghost_path directory.
Now, manually add the service to the database:
INSERT INTO services (account_id, name, description, type) VALUES ('1', 'My Bot', 'My Bot Description', 'ghost');
Here, 1 is the account ID. This can be found from the URL on the Account Services page for the target account.
Now, go to the Account Services page and select the new service. You must fill out the following service parameters using the Key/Value/submit form (may be case sensitive depending on your database):
id: the subdirectory name in ghost_path
for example, if your bot is located in /ghost/bot/ and ghost_path = /ghost/, then this is "bot"
id3: a three digit number, preferable the service ID left-padded with zeroes
for example, if your service ID (services.id in database, or get from Service Manager URL) is 14, we recommend 014 for the id3
** Finish up the GHost service **
If you have set up a database service, you can automatically configure the GHost service to use the database. To do this, select the GHost service and enter the Service Manager. Then, under "Set database settings", enter the ID number of the database service (this can be found in the URL for the database service Service Manager page) and hit the button.
*********************************
*** Creating a pychop service ***
*********************************
This is similar to creating a GHost service.
***********************
*** Setting up jail ***
***********************
The uxpanel jail system enhances security by running host bots as a separate user. It is highly recommended that you use this system.
For information on how to set it up, see uxpanel/include/jail.php.
WARNING: while the jail system will run processes as a separate user, it implements no under security measures. It doesn't provide much additional benefit unless you take steps to lock down these separate users via other software or configurations.
************************
*** Setting up slave ***
************************
The uxpanel slave system allows you to run uxpanel across multiple servers.
First, install and configure uxpanel on both the master server and any slave servers. On slave servers, set a unique slave_id in the configuration file, and set the database server to the master server.
When creating a new service, use the slave server administration section instead of the master.
To automatically redirect users to the service page on the slave, set the following service parameters: slave and slave_id. The first should be a URL, with trailing slash, to the slave panel instance directory. The second should be the unique ID of the target slave (this is mostly for the cron setup, if you have a custom cron script executed through cron.php).
************
*** Cron ***
************
Cron can be useful for several things, such as updating stats on database services.
uxpanel comes with a cron file that can be used to execute custom cron functions defined in a separate PHP file, referenced as cron_path in configuration. The uxpanel cron.php will automatically run any custom cron functions found in the cron_path file for each service, and then also execute a custom shutdown function (if exists) that can be used to send alerts after service-specific functions finish executing.
An example custom cron file can be found in sample/custom_cron.php.
**************************
*** Service parameters ***
**************************
Service parameters let you define specific restrictions or other settings for individual services. This is a list of all service parameters.
All services:
- id: this is usually the subdirectory (of the relevant service type path) where the service resides.
- price: the price of this service; value format: $X.Y [monthly/quarterly/semi-annually/annually] (format is only needed for the admin Status tab)
- due: the date that this service is "due"
- slave: if this service resides on a slave uxpanel instance, this is the URL to the root uxpanel installation on the slave (with trailing slash)
- slave_id: the unique slave ID if this service resides on a slave uxpanel instance
Process-based services (all except database):
- pid: the current process ID, or 0 if not running
- start_time: some services have this, it indicates the last time the service was started
- start_time2: some services have this, indicating the last last time service was started
- jail: set to 1 if jail should be enabled
- jail_user: the username of jail account
- jail_path: the absolute path, with trailing slash, to service directory under jailed account
GHost:
- extrakeys: the name of any extra keys in configuration files that the user can set
- ignorekeys: keys that should be hidden to the user (warning: recommended to use default.cfg instead)
- mclimit: limit on the number of map configuration files (default: 200)
- mlimit: limit on the number of maps (default: 1000)
- nostop: indicates that this service cannot be stopped (but can be restarted)
Channel:
- extrakeys, ignorekeys: see same setting under GHost
- nostop: see same setting under GHost
Database:
- db_name: the database name
- db_host: the hostname where database is located
- db_username: the database username
- db_password: the database password
- replay_base: URL with trailing slash where replays are stored (i.e., replays should reside in this URL); default blank, indicated no direct replay download
Minecraft:
- memory: memory in megabytes to use for -Xmx option (default 1024)
- uploadable: set to 1 if user is allowed to upload own JAR files for plugins and server
- plimit: limit on the number of plugins
- blimit: limit on the number of world backups
- nostop: see same setting under GHost
Garena:
- extrakeys, ignorekeys: see same setting under GHost
- climit: limit on the number of room connections for this Garena instance