-
Notifications
You must be signed in to change notification settings - Fork 0
/
server-starter_example.yml
63 lines (60 loc) · 1.54 KB
/
server-starter_example.yml
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
schedules:
- cron: "* * * * *"
action: cmd
value: echo 正在运行一个计划任务
# - cron: "0 0 * * *"
# action: server-stop
# server: server1
# - cron: "30 13 * * *"
# enabled: false
# action: server-restart
# server: server1
# - cron: "0 6 * * *"
# action: server-start
# server: server1
# - cron: "0 4 * * 4"
# action: multi
# value:
# - action: server-command
# server: server1
# value: "say 将会关闭服务器以创建备份"
# - action: wait
# # 单位:毫秒
# value: 60000
# - action: stop-all-server
# - action: cmd
# # 你需要自行编写备份逻辑
# value: |
# bash -c 'mkdir backup/ && tar -zcf backup/$(date +%Y-%m-%d_%H:%M:%S).tar.gz server1/ mariadb/data/'
# - action: start-auto-starts-server
# - action: wait
# # 单位:毫秒
# value: 120000
# - action: server-command
# server: server1
# value: "say 服务器已完成备份"
servers:
shell:
isMultiple: true
params: [bash]
# mariadb:
# params: [./start-mariadb.sh ./mariadb_data]
# server1:
# exec-option: { shell: true }
# params: java -jar server.jar
# stopCommands:
# - type: cmd
# value: stop
# timeoutMs: 60000
autoStarts:
- shell
#- server1
#- mariadb
autoRestarts:
#- server1
#- mariadb
defaultCommandOutputServer: shell
# 需要重启以加载以下配置
debugMode: false
stopCommand: stop
catchUnexceptedErrors: false