Jump to content

theanimal

Member
  • Posts

    5
  • Joined

  • Last visited

About theanimal

  • Birthday 11/17/1987

Profile Information

  • Gender
    Man

theanimal's Achievements

  1. Hi I'm running a Hungarian server and I've done a lot of reading and experimenting. I would like to share the result of this with you. I apologize for my English. If I do not write correctly please forgive me. Unfortunately, I noticed that there is not a comprehensive description of the operation. I have tried several ways to make the server stable. Docker, AMP and others. So far the most stable is when I installed it directly on a linux. Based on this: https://pzwiki.net/wiki/Dedicated_Server#Linux The important thing is that the game must be run as a service However, if I run it natural I can't use many things that were very convenient. E.g. automatic reboot daily, writing logins and logouts to DC, etc... I started to program these. According to the wiki description above, if you have installed the server then the files are in /home/pzuser/Zomboid. These are what we will be operating with. I'll try to guide you through so you can use the ones I've already developed. I run the server on Ubuntu 22.0.4 If you have any feedback or ideas, please let me know... I am developing the scripts, I will update the changes here My first task was the daily restart. Obviously this is done by crone on linux, but I didn't want to reboot the server with brute force in a barbaric way. I was afraid of losing data. Make a restart.sh file in your home directory. yourname SHOULD ALWAYS BE CHANGED TO YOUR LINUX USERNAME! touch /home/yourname/restarter.sh restarter.sh contents: #!/bin/bash #V0.9 # #Todo: #Checking stemCMD server status #Start DateTime date +'%Y.%m.%d %T' echo "Start PZ server restart" #POST request to Discord Webhook # # CHANGE YOUR DISCORD WEBHOOK URL # dc_channel="YOUR DC WEBHOOK URL" rcon_passwd="YOUR RCON PASSWD" #send message to discord channel function sendDC () { curl -H "Content-Type: application/json" -X POST -d "{\"content\": \"$1\"}" $dc_channel } sendDC "Starting restart method..." echo "30 sec" rcon -H localhost -p 27015 -P $rcon_passwd servermsg \"Restart after 30sec\" sleep 20 echo "10 sec" rcon -H localhost -p 27015 -P $rcon_passwd servermsg \"Restart after 10sec\" sleep 5 echo "5 sec" rcon -H localhost -p 27015 -P $rcon_passwd servermsg \"Restart after 5sec\" sleep 5 sendDC "Status: Save and Quit" date +'%Y.%m.%d %T' #PZ server save and quit rcon -H localhost -p 27015 -P $rcon_passwd quit #TODO checking in loop 10 sleep #wait 3m for it to expire for sure sleep 3m #check service status serviceStatus=$( systemctl is-active zomboid.service ) echo "Service status: $serviceStatus"; if [ $serviceStatus == 'active' ] then date +'%Y.%m.%d %T' echo "Server running... waiting..." systemctl stop zomboid.service echo "Server stopped after sysctl stopping!" sendDC "Status: Stopped" sleep 30 else date +'%Y.%m.%d %T' echo "Server stopped!" sendDC "Status: Stopped" fi #start service date +'%Y.%m.%d %T' echo "Starting" sendDC "Status: Starting..." systemctl start zomboid.service #wait 3m before connecting sleep 3m echo "Ready" sendDC "Status: Ready" echo "----------"; now create a log file where the output of the script will be saved... (don't forget to change your name) touch /home/yourname/log now set the script to run every day at 04:00... crontab -e copy to the bottom of the file (don't forget to change your name) 0 4 * * * /home/yourname/restarter.sh >> /home/yourname/log I will continue soon with the description of the script that monitors player logins
  2. Hi, I have my own dedicated server for players in Hungary. We're working on it a lot and trying to improve it, but we keep hitting roadblocks. Try to avoid having to use mods. I am developing a website where players can use various features that affect their characters. We have problems that we are looking for solutions to: Wipe: We found a solution for this, if a building/part of town has been destroyed by players, I wipe the corresponding chunk and restart the server. Then they are regenerated again. I wrote a bash script for linux to do this. It does the job by typing in the coordinates. Is there a nicer way to do this? Send a message in chat: I want to send messages to chat from an external script. The discord messaging is broken. A message appears several times. Sometimes it doesn't work at all. We want to post player logouts and logins. Online admins and other periodic messages. Incorrect zombie spawn: There is an area where many identical zombies spawn. Without Loot. How to fix it? How can I find out exactly where they spawn? Retrieving player statistics: The server has a story. ViralService Corporation was formed to provide various services for money (in game money). Moving, safezone expansion, etc... Services include curing a bite infection with side effects. As a side effect they lose xp points and get negative effects. With the addxp command I can deduct xp but how can I put a negative trait on a player from console? How can I query what skill levels they have and what traits they have? Player inventory: How can I check if a player has an item? If it is, how can I remove it? Maybe you are thinking about developing RESTApi? Or expanding commands? Is paid support available? Thanks! Br, David
  3. Hi, Unfortunately there is a problem with the server freezing due to a memory error. The VM has 16G memory but the game just uses 8G memory. The server is a serious DELL running ESXi. I run a VM with a ubuntu server and the game runs on it. If you need any information, let me know. Thanks! Br, David
×
×
  • Create New...