Try something like this while logged in as eqemu user:
Code:
#! /bin/sh
cd /home/eqemu/server
./server_stop.sh
./world database:dump --login-tables --player-tables
cd /home/eqemu
tar -zcf old_binaries.tar.gz server_source
cd /home/eqemu/server_source
git pull --recurse-submodules
cd /home/eqemu/server_build
rm -rf *
cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -G "Unix Makefiles" /home/eqemu/server_source
make
cd /home/eqemu/server
./server_start_with_login.sh
This assumes you are using Ubuntu or Debian and aren't using bots. If you're using bots then add "-DEQEMU_ENABLE_BOTS=ON" to the cmake line just after the cmake. If you're using Fedora then the cmake line should look more like this:
cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DLUA_INCLUDE_DIR=/usr/include/lua-5.1/ -G "Unix Makefiles" cd /home/eqemu/server_source
Note that the script backs up the player and login tables before running, and also tarballs up the old binaries in case the compilation fails.
Disclaimer: I take no responsibility if this borks anything. If in doubt, manually back up your stuff and run it one line at a time.