Tailf is deprecated, use tail -f instead + Bugfix in tail invocation

This commit is contained in:
Gordian Edenhofer 2015-12-14 21:32:27 +01:00
parent 2d367a746a
commit ccd743fc8a
3 changed files with 9 additions and 7 deletions

View File

@ -27,7 +27,7 @@ pkgbase = minecraft-server
md5sums = c644abdf293c2f98033a64d732a4945c md5sums = c644abdf293c2f98033a64d732a4945c
md5sums = 5ed78e366146e47f8498347e93ad5423 md5sums = 5ed78e366146e47f8498347e93ad5423
md5sums = d4656f27716fd78ab64344a517b07443 md5sums = d4656f27716fd78ab64344a517b07443
md5sums = 9011b19dc6218d41989835a6bba033e0 md5sums = 2a54c072bb414eb6a14867efabfc163a
pkgname = minecraft-server pkgname = minecraft-server

View File

@ -26,7 +26,7 @@ md5sums=('a0671390aa0691e70a950155aab06ffb'
'c644abdf293c2f98033a64d732a4945c' 'c644abdf293c2f98033a64d732a4945c'
'5ed78e366146e47f8498347e93ad5423' '5ed78e366146e47f8498347e93ad5423'
'd4656f27716fd78ab64344a517b07443' 'd4656f27716fd78ab64344a517b07443'
'9011b19dc6218d41989835a6bba033e0') '2a54c072bb414eb6a14867efabfc163a')
package() { package() {
install -Dm644 minecraftd.conf "${pkgdir}/etc/conf.d/minecraft" install -Dm644 minecraftd.conf "${pkgdir}/etc/conf.d/minecraft"

View File

@ -130,8 +130,10 @@ server_command() {
sudo -u ${MC_USER} screen -S ${SESSION_NAME} -Q select . > /dev/null sudo -u ${MC_USER} screen -S ${SESSION_NAME} -Q select . > /dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
sleep 0.1s &
SLEEP_PID=$!
mc_command "$@" & mc_command "$@" &
tailf --pid=$! -n 0 ${LOGPATH}/latest.log & tail -f --pid=${SLEEP_PID} -n 0 ${LOGPATH}/latest.log
else else
echo "There is no ${SESSION_NAME} session to connect to." echo "There is no ${SESSION_NAME} session to connect to."
fi fi