- Use full path for java to resolve server startup operations
- bump PORTREVISION PR: ports/165884 Submitted by: ler@lerctr.org Approved by: maintainer, freebsd@rakor-net.de Feature safe: yes
This commit is contained in:
parent
90485c98d3
commit
54f4a08d27
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=293019
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= minecraft-server
|
||||
PORTVERSION= 1.2.3
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= games java
|
||||
MASTER_SITES= http://s3.amazonaws.com/MinecraftDownload/launcher/ \
|
||||
http://denkrobat.de/minecraft/ \
|
||||
|
@ -27,7 +27,7 @@ if [ -e %%DATADIR%%/server.log.lck ]; then
|
||||
else
|
||||
echo "Starting Minecraft-Server..."
|
||||
cd %%DATADIR%%
|
||||
/usr/bin/su %%USERS%% -c "%%PREFIX%%/bin/tmux new-session -d -s minecraft \"java -Xmx1024M -Xms1024M -jar %%DATADIR%%/minecraft_server.jar nogui\""
|
||||
/usr/bin/su %%USERS%% -c "%%LOCALBASE%%/bin/tmux new-session -d -s minecraft \"%%LOCALBASE%%/bin/java -Xmx1024M -Xms1024M -jar %%DATADIR%%/minecraft_server.jar nogui\""
|
||||
|
||||
i=0
|
||||
while [ $i -lt 15 ]; do
|
||||
@ -41,8 +41,8 @@ else
|
||||
done
|
||||
|
||||
if [ $i -ge 10 ]; then
|
||||
echo "ERROR: Server could not be startet."
|
||||
/usr/bin/su %%USERS%% -c "%%PREFIX%%/bin/tmux kill-session -t minecraft"
|
||||
echo "ERROR: Server could not be started."
|
||||
/usr/bin/su %%USERS%% -c "%%LOCALBASE%%/bin/tmux kill-session -t minecraft"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@ -50,7 +50,7 @@ fi
|
||||
minecraft_stop(){
|
||||
if [ -e %%DATADIR%%/server.log.lck ]; then
|
||||
echo "Halting Minecraft-Server."
|
||||
/usr/bin/su %%USERS%% -c "%%PREFIX%%/bin/tmux send -t minecraft:0.0 stop \"Enter\""
|
||||
/usr/bin/su %%USERS%% -c "%%LOCALBASE%%/bin/tmux send -t minecraft:0.0 stop \"Enter\""
|
||||
|
||||
|
||||
i=0
|
||||
@ -59,13 +59,13 @@ if [ -e %%DATADIR%%/server.log.lck ]; then
|
||||
if [ -e %%DATADIR%%/server.log.lck ]; then
|
||||
sleep 1
|
||||
else
|
||||
echo "Minecraft-Server haltet."
|
||||
echo "Minecraft-Server halted."
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $i -ge 10 ];then
|
||||
echo "ERROR: Server could not be haltet."
|
||||
echo "ERROR: Server could not be halted."
|
||||
fi
|
||||
else
|
||||
echo "Minecraft-Server not running."
|
||||
|
Loading…
Reference in New Issue
Block a user