Skip to content

Commit b6de66a

Browse files
authored
Added documentation for send command (#105)
Send command was not documented, so I wrote some barebones documentation for it so people know that it exists
1 parent a3b7195 commit b6de66a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

commands/send.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# send
2+
3+
LinuxGSM comes with a game server `send` command.
4+
5+
## Commands
6+
7+
Standard: `./gameserver send your_command_here`
8+
9+
Send will send a command to the gameserver, as if it were entered into the console of the gameserver.
10+
11+
### Scheduled Commands
12+
13+
A [cronjob](../configuration/cronjobs.md) can be set to run `send` at any given time.
14+
15+
To edit cronjobs,. type:
16+
17+
`crontab -e`
18+
19+
A cronjob can be run as the `gameserver user` or as `root`, this choice is down to personal preference. Remember to amend the examples to match a specific game server.
20+
21+
Here is an example of a user based cronjob to send a message to a server every hour.
22+
23+
```text
24+
0 * * * * /home/username/gameserver send "Test Message" > /dev/null 2>&1
25+
```
26+
27+
Here is an example of a root based cronjob to send a message once every hour.
28+
29+
{% hint style="info" %}
30+
The extra `su - username -c` indicates which user to run the script as.
31+
{% endhint %}
32+
33+
```text
34+
0 * * * * su - username -c '/home/username/gameserver send "Test Message"' > /dev/null 2>&1
35+
```
36+
37+
[crontab.guru](https://crontab.guru/) is a great resource to generate cronjobs.
38+

0 commit comments

Comments
 (0)