View | Details | Raw Unified | Return to bug 203664 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (+1 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	minecraft-server
3
PORTNAME=	minecraft-server
4
PORTVERSION=	1.8.8
4
PORTVERSION=	1.8.8
5
PORTREVISION=	1
5
CATEGORIES=	games java
6
CATEGORIES=	games java
6
MASTER_SITES=	https://s3.amazonaws.com/Minecraft.Download/versions/${PORTVERSION}/
7
MASTER_SITES=	https://s3.amazonaws.com/Minecraft.Download/versions/${PORTVERSION}/
7
DISTNAME=	minecraft_server.${PORTVERSION}.jar
8
DISTNAME=	minecraft_server.${PORTVERSION}.jar
(-)files/minecraft.in (-3 / +14 lines)
Lines 7-13 Link Here
7
#
7
#
8
# rc.conf variables:
8
# rc.conf variables:
9
# minecraft_enable (Default: NO)
9
# minecraft_enable (Default: NO)
10
# minecraft_mem (Default: 1024M)
10
# minecraft_mem  (Deprecated) (Default: $minecraft_memx)
11
# minecraft_mems (Default: 1024M)
12
# minecraft_memx (Default: 1024M)
11
# minecraft_args (Default: "")
13
# minecraft_args (Default: "")
12
. /etc/rc.subr
14
. /etc/rc.subr
13
15
Lines 17-23 Link Here
17
19
18
load_rc_config $name
20
load_rc_config $name
19
21
20
minecraft_mem=${minecraft_mem:-"1024M"}
22
minecraft_mems=${minecraft_mems:-"1024M"}
23
minecraft_memx=${minecraft_memx:-"1024M"}
24
minecraft_mem=${minecraft_mem}
21
minecraft_args=${minecraft_args:-""}
25
minecraft_args=${minecraft_args:-""}
22
26
23
extra_commands="console status kill"
27
extra_commands="console status kill"
Lines 37-46 Link Here
37
{
41
{
38
	if is_running; then
42
	if is_running; then
39
		echo "${name} is already running."
43
		echo "${name} is already running."
44
	elif [ ${minecraft_mems%?} -gt ${minecraft_memx%?} ]; then
45
		echo "ERROR: minecraft_mems is set greater than minecraft_memx."
46
		echo "ERROR: Set minecraft_memx to be equal or greater than minecraft_mems in rc.conf."
40
	else
47
	else
48
		if [ ! -z $minecraft_mem ]; then
49
			echo "WARNING: minecraft_mem is deprecated. Please change this to minecraft_memx."
50
			minecraft_memx=$minecraft_mem
51
		fi
41
		echo "Starting ${name}."
52
		echo "Starting ${name}."
42
		cd %%PREFIX%%/minecraft-server
53
		cd %%PREFIX%%/minecraft-server
43
		su mcserver -c "%%LOCALBASE%%/bin/tmux new-session -s minecraft -d '%%LOCALBASE%%/bin/java -Xmx${minecraft_mem} -Xms${minecraft_mem} ${minecraft_args} -jar %%PREFIX%%/minecraft-server/minecraft_server.%%VERSION%%.jar nogui'"
54
		su mcserver -c "%%LOCALBASE%%/bin/tmux new-session -s minecraft -d '%%LOCALBASE%%/bin/java -Xmx${minecraft_memx} -Xms${minecraft_mems} ${minecraft_args} -jar %%PREFIX%%/minecraft-server/minecraft_server.%%VERSION%%.jar nogui'"
44
	fi
55
	fi
45
}
56
}
46
57
(-)files/pkg-message.in (-3 / +4 lines)
Lines 3-11 Link Here
3
3
4
It is required to read the EULA, and then set eula=true
4
It is required to read the EULA, and then set eula=true
5
5
6
- Configuration files can be found at %%ETCDIR%%
6
- Configuration files can be found at %%ETCDIR%%/
7
- Log and debug output files can be found at /var/log/minecraft-server/
7
- Log and debug output files can be found at /var/log/minecraft-server/
8
- World files can be found at /var/db/minecraft-server
8
- World files can be found at /var/db/minecraft-server/
9
9
10
Without daemon option:
10
Without daemon option:
11
- To run the server, run %%PREFIX%%/bin/minecraft-server
11
- To run the server, run %%PREFIX%%/bin/minecraft-server
Lines 13-19 Link Here
13
13
14
With daemon option:
14
With daemon option:
15
- The service has been installed with the name 'minecraft'
15
- The service has been installed with the name 'minecraft'
16
- To adjust memory usage, use MINECRAFT_MEM= in /etc/rc.conf
16
- To adjust maximum memory usage (-Xmx), use MINECRAFT_MEMX= in /etc/rc.conf
17
- To adjust initial memory usage (-Xms), use MINECRAFT_MEMS= in /etc/rc.conf
17
- To add other java parameters, use MINECRAFT_ARGS= in /etc/rc.conf
18
- To add other java parameters, use MINECRAFT_ARGS= in /etc/rc.conf
18
- To see the interactive console, type service minecraft console
19
- To see the interactive console, type service minecraft console
19
20

Return to bug 203664