-
Notifications
You must be signed in to change notification settings - Fork 4
II.2. Server commands
- quit or exit or q
- respawn
- help
- set
- get
- remove
- uptime
- add-superuser
- remove-superuser
- stop
- start
- reload-boards
- reload-config
- reload-templates
- rerender-posts
- regenerate
- rebuild-search-index
Quit the application (process.exit(0); is used).
Respawns worker processes. Current processes exit with exitCode or 0, if not specified.
Print brief command help.
Set a configuration option (current config file will be overwritten). If value is not specified, you will be prompted to enter it.
Example:
ololord.js> set system.workerCount 2
OK
Print a configuration option.
Example:
ololord.js> get system.workerCount
Value for 'system.workerCount': 1
Remove a configuration option (current config file will be overwritten).
Example:
ololord.js> remove system.workerCount
OK
Show for how long the server has been running. The format is <days> <hours>:<minutes>:<seconds>.
Example:
ololord.js> uptime
0 days 19:12:55
Register a superuser. You will be prompted to enter a password or a password SHA-1 hash (recognized automatically), and then a list of IP addresses. These addresses are used to prevent the deletion of your posts by an administrator or a moderator (accidentally or intentionally).
Example:
ololord.js> add-superuser
Enter password:
*************
Enter superuser IP list (separate by spaces): 127.0.0.1 192.168.0.1
OK
Removes a superuser from the databas. You will be prompted to enter a password or a password SHA-1 hash (recognized automatically).
Example:
ololord.js> remove-superuser
Enter password:
*************
OK
Causes all worker processes to close existing connections and to stop listening for new connections.
Example:
ololord.js> stop
[17677] Closed
OK
Causes the workers to start listen for connections again.
Example:
ololord.js> start
[17677] Listening on port 8080...
OK
Causes all worker processes to close existing connections and to stop listening for new connections, and reloads the boards. After that, causes the workers to start listen for connections again. Useful when you add, remove or edit some boards.
Example:
ololord.js> reload-boards
[17677] Closed
[17677] Listening on port 8080...
OK
Causes all worker processes to close existing connections and to stop listening for new connections, and reloads the configuration file. If fileName is specified, it is used as a new config file. After that, causes the workers to start listen for connections again. Useful when you edit configuration file.
Example:
ololord.js> reload-config ./config-dev.json
[17677] Closed
[17677] Listening on port 8080...
OK
Causes all worker processes to close existing connections and to stop listening for new connections, and reloads the templates (including the template partials). After that, causes the workers to start listen for connections again. Useful when you update some templates/partials, or add new one(s).
Example:
ololord.js> reload-templates
[17677] Closed
[17677] Listening on port 8080...
OK
Causes all worker processes to close existing connections and to stop listening for new connections, and rerenders all posts. After that, regenerates the cache. Then causes the workers to start listen for connections again. Useful when there have been changes in the parser and you want to update existing posts. If board is specified, only posts on this board will be rerendered, otherwise, all posts on all boards will be rerendered.
Note: This operation may take some time, depending on post count.
Example:
ololord.js> rerender-posts ny
Are you sure? [Yes/no]
[17677] Closed
Rendering post: [ny] 17
Rendering post: [ny] 12
Rendering post: [ny] 10
Rendering post: [ny] 1
Rendering post: [ny] 7
Rendering post: [ny] 16
Rendering post: [ny] 4
Rendering post: [ny] 15
Rendering post: [ny] 13
Rendering post: [ny] 2
Generating JSON cache, please, wait...
Generating HTML cache, please, wait...
Generating RSS, please, wait...
[17677] Listening on port 8080...
OK
Causes all worker processes to close existing connections and to stop listening for new connections, and regenerates the cache. If -a of --archive option is passed, archived threads are also regenerated. Then causes the workers to start listen for connections again. Useful when cache bugs are detected. It's easier to just restart the application, though.
Example:
ololord.js> regenerate
[17677] Closed
Generating JSON cache, please, wait...
Generating HTML cache, please, wait...
Generating RSS, please, wait...
[17677] Listening on port 8080...
OK
Rebuilds post search index. Useful if the index was corrupted due to editing DB manually, or some bug.
Note: This operation may take some time, depending on post count.
Example:
ololord.js> rebuild-search-index
Are you sure? [Yes/no]
Purging post search index (this may take some time)...
Rebuilding post search index: [a] 190
Rebuilding post search index: [a] 84
Rebuilding post search index: [a] 204
Rebuilding post search index: [a] 214
Rebuilding post search index: [a] 152
Rebuilding post search index: [a] 25
Rebuilding post search index: [a] 104
Rebuilding post search index: [a] 98
Rebuilding post search index: [a] 10
Rebuilding post search index: [a] 115
Rebuilding post search index: [a] 4
Rebuilding post search index: [a] 127
Rebuilding post search index: [a] 171
Rebuilding post search index: [a] 181
Rebuilding post search index: [a] 185
Rebuilding post search index: [a] 32
Rebuilding post search index: [a] 15
Rebuilding post search index: [a] 209
Rebuilding post search index: [a] 8
Rebuilding post search index: [a] 112
Rebuilding post search index: [a] 144
[And so on]
OK