• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Auto restarter linux + logi

Verdis

Ciekawy świata.
Joined
May 28, 2012
Messages
394
Reaction score
9
Location
Poland
Witam,
jak dodać to tego, żeby zapisywało wszystko co się dzieje na serwerze? Tzn błędy w konsoli, kto zalogował wylogował etc. :) Proszę o pomoc :)

#!/bin/bash
ulimit -c unlimited
while true; do ./theforgottenserver; done
 
Za bardzo się nie znam na linuxie, ale może to zadziała:
Code:
#!/bin/bash
ulimit -c unlimited
while true; do ./theforgottenserver > log.txt; done
 
A to?
Code:
#!/bin/bash
ulimit -c unlimited
while true; do ./theforgottenserver 
--log-file "output.txt" "error.txt"; done
Pamiętaj o chmodach.
 
chmody: 777
Lecz serwer się włącza cały czas, tzn gdy wszystko się załaduje leci od nowa. Do txt nic nie jest dodawane :(((
./ots.sh: line 4: 16266 Segmentation fault ./otss
./ots.sh: line 4: --log-file: command not found
 
Last edited:
Hmm, z tego co się orientuję to TFS ma wbudowanego loggera. Spróbuj się nim trochę pobawić :P

Linijki, które za niego odpowiadają:
Code:
  adminLogsEnabled = "yes"
   displayPlayersLogging = true
   prefixChannelLogs = ""
   runFile = ""
   outLogName = ""
   errorLogName = ""
   truncateLogsOnStartup = false
Mam na myśli głównie outLogName i errorLogName.
 
Back
Top