-
Notifications
You must be signed in to change notification settings - Fork 3
/
server.settings
89 lines (73 loc) · 2.4 KB
/
server.settings
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
#!/bin/bash
# minecraft server settings
# this file stores all the variables for the server.
# if you know what you are doing, feel free to tinker with them ;^)
# github branch from whom scripts will fetch
branch="replaceBranch"
# your contact info for players
adminContact="your admin did not edit the server settings file /:"
# welcome messages if a player joins
welcome=("welcome on my server" "a warm welcome to" "greetings" "hello to" "welcome aboard" "make yourself at home" "have a nice time" "enjoy yourself")
# arguments for java server
javaArgs="-Xmx2048M"
# server resource paths
serverName="replaceServerName"
homeDirectory="replaceHomeDirectory"
serverDirectory="replaceServerDirectory"
backupDirectory="replaceBackupDirectory"
executableServerFile="replaceExecutableServerFile"
# network public and private addresses
public="1.1.1.1"
private="192.168.1.1"
# logfile names
screenLog="screen.log"
backupLog="backup.log"
debugLog="debug.log"
# backup config
doHourly=true
doDaily=true
doWeekly=false
doMonthly=false
# values in bytes for disk space control
diskSpaceError=2097152
diskSpaceWarning=8208608
# values in percent for backup size control
backupSizeError=20
backupSizeWarning=40
# backup file formats
newHourly=$(date +"%H:00")
newDaily=$(date +"%Y-%m-%d")
newWeekly=$(date +"week-%U")
newMonthly=$(date +"%B" | awk '{print tolower($0)}')
oldHourly=$(date -d "-23 hours" +"%H:00")
oldDaily=$(date -d "-17 days" +"%Y-%m-%d")
oldWeekly=$(date -d "-11 weeks" +"week-%U")
oldMonthly=$(date -d "-5 months" +"%B" | awk '{print tolower($0)}')
# world and backup sizes in bytes and human readable
worldSizeBytes=$(du -sb world | cut -f1)
backupSizeBytes=$(du -sb backups | cut -f1)
diskSpaceBytes=$(df -B 1 / | tail -1 | awk '{print $4}')
worldSizeHuman=$(du -sh world | cut -f1)
backupSizeHuman=$(du -sh backups | cut -f1)
diskSpaceHuman=$(df -h / | tail -1 | awk '{print $4}')
# enable admin tasks from ingame chat
enablePerformBackup=true
enablePerformRestart=true
enablePerformUpdate=false
enablePerformReset=false
# enables or disable some advanced options
enableDebug=false
changeToConsole=false
enableWelcomeMessage=true
enableBackupsWatchdog=true
enableAutoStartOnCrash=false
# terminal output colours
black="$(tput setaf 0)"
red="$(tput setaf 1)"
green="$(tput setaf 2)"
yellow="$(tput setaf 3)"
blue="$(tput setaf 4)"
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
noColor="$(tput sgr0)"