summarylogtreecommitdiffstats
path: root/forge-server.install
blob: 5150eaf253fc1323c60f8c860b725c3b1e60124a (plain)
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
_game="forge"
_user="forge"
_server_root="/srv/forge"

post_install() {
	chown -R "${user}:${user}" "$_server_root"

	echo "The world data is stored under ${_server_root} and the server runs as ${_user} user to increase security."
	echo "Use the ${_game} script under /usr/bin/${_game}d to start, stop or backup the server."
	echo "Adjust the configuration file under /etc/conf.d/${_game} to your liking."
	echo "For the server to start you have to accept the EULA in ${_server_root}/eula.txt !"
	echo "The EULA file is generated after the first server start."
}

post_upgrade() {
	chown -R "${user}:${user}" "$_server_root"
	
	echo "The management script switched from GNU screen to tmux."
	echo "Manual intervention is needed to close the previous GNU screen sessions:"
	echo "Use \`sudo -u ${_user} screen -S ${_game} -rx\` to attach to the ${_game} session and stop it."
	echo "Do the same for the \`idle_server_${_game}\` session if one is running."
}

post_remove() {
	[ -d "$_server_root" ] && echo "Game saves in ${_server_root} have been kept on your system."
	echo "The configuration in /etc/conf.d/ has been kept on your system."
	echo "The ${_forge_user} user has been kept on your system."
}