Realm server software update and clean up

Threads that no longer serve a purpose. Read-only.
nomercy4you
Invader
8 | 5
Hello,

I would like to update the realm server to recent software versions, because there are some vulnerabilities in the software we use. e.g. PHP.
Unfortunately archlinux already runs PHP7 so there could be some problems. We need to test if our scripts are still working or if they need to be updated.
For example mysql extension support was dropped and you have to use mysqli or mysql pdo now.

Also we need to delete some log files (we need to get around 3-5gb more free space) because there is not enough space left for a full snapshot. I have an external panel for controlling snapshots so in the case of an update desaster we can restore our server.

Also there is a problem with the nginx configuration atm, you can access some private folders (munin). You need to know the exact URL but still they are not http password protected. I will fix this aswell.

Also /srv/http and folders underneath it are readable by "other", that is not good aswell, I will fix it.

I do not remember the exact configuration maybe we need to set up another cron job to copy munin images to an unprotected place, so we can use them on public webpages. I will check the setup.

EDIT: Marco if you are reading this: "Multiplayer" link on the forum toolbar is not working. (blank page)
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
@nomercy

hi, good idea to update server - I thought about it too, but since I know what a pain in the ass updating Arch linux (after such long time) can be I haven't even tried it without access to snapshots..

considering problems you mention about PHP7 I'd rather wait with updating - tsw.vn.cz blog will probably "move" to tsw.median-xl.com... and once there will be only pvpgn & d2gs running, there won't be need to update everything.
Also that reminds me, that if you update whole system, there's possibility that d2gs will stop working under wine (it happend on my gentoo server and also I had problems on centos - probably some libraries that got updated...)

nginx config was like that since the beginning when you set it up and nobody cared :D - but I think fixed it now
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)
nomercy4you
Invader
8 | 5
OK thank you. I need 10 posts to give you a cookie :(

I know I did something wrong with the nginx config, I forgot it and then never fixed it.

Do you still have the test realm? I will try to compile d2gs on another arch server that is up to date and then test it.
nomercy4you
Invader
8 | 5
New Post:

Can we delete all files older than 30 days in /var/games/pvpgn/chanlogs/?

we could use a cronjob with the following bash script:
#!/bin/bash
## Remove old files
if [ -d "/var/games/pvpgn/chanlogs/" ] ; then
cd /var/games/pvpgn/chanlogs/
echo "Purging old files in /var/games/pvpgn/chanlogs/"
# Delete all files older than 30 days
find . \( -name ".*" \) -mtime +30 -exec rm -rf {} \;
fi
nomercy4you
Invader
8 | 5
And last post (because completly unrelated):

https://github.com/tesseract2048/d2gs

Provides changed d2gs maybe we could try this.

And https://gist.github.com/friederschueler ... a84a28a419
D2GS Patch for wine 1.6.2. Maybe it can be applied to 1.9.x?
User avatar
Marco
Team Member
1952 | 1347
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Legendary Love Badge
Earned over 500 cookies
Common Supporter Badge
Donated 1 time
Common Multiplayer Badge
Has won a multiplayer contest
Legendary Contribution Badge
Median XL Team Member
Common Auction Badge
Won 50 auctions
You guys are awesome
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
nomercy4you wrote:https://github.com/tesseract2048/d2gs

I already tried that (on several systems) but I couldn't get it to start :( And we need to run it on several different OSs
Maybe it just needs some DLLs...
If anyone manage to find out what it needs (and it will run even under wine) we could use it.... (and it also needs their patched pvng server)

nomercy4you wrote:And https://gist.github.com/friederschueler ... a84a28a419
D2GS Patch for wine 1.6.2. Maybe it can be applied to 1.9.x?

maybe...but will wine 1.9.x help anything?
I already tried (patched) wine 1.2.2, 1.3.6 and 1.6.2 but still d2gs doesn't run on different Linux machines (my gentoo server where it used to work, centos 5, 2x centos 6)
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
nomercy4you wrote:Can we delete all files older than 30 days in /var/games/pvpgn/chanlogs/?

I don't have any problems with that...I only slightly edited your script:

/home/diablo/scripts/purge_old_chanlogs.sh:
#!/bin/sh

CHANLOGS=/var/games/pvpgn/chanlogs

## Remove old files
if [ -d "$CHANLOGS" ] ; then
# echo "Purging old files in ${CHANLOGS}"
# Delete all files older than 30 days
find ${CHANLOGS}/ -type f -name "chanlog-*" -mtime +30 -exec /bin/rm {} \;
fi


also when looking for big files I noticed /home/nomercy/d2gs.zip (769 MB) so if you need more space...
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)
User avatar
GregMXL
Team Member
10590 | 180
Legendary Posting Badge
Posted over 10.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Great Love Badge
Earned over 100 cookies
Great Supporter Badge
Donated 5 times
Legendary Contribution Badge
Median XL Team Member
Great Special Badge
Legend.
Marco wrote:You guys are awesome

Definitely agree.
I don't mean to dwell...but I can't help myself.
User avatar
aahz
Team Member
495 | 287
Great Popularity Badge
Has a thread with over 50.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Common Patron Badge
Patreon Contributor
Legendary Contribution Badge
Median XL Team Member
aahz wrote:I already tried that (on several systems) but I couldn't get it to start :( And we need to run it on several different OSs
Maybe it just needs some DLLs...
If anyone manage to find out what it needs (and it will run even under wine) we could use it....

Now I know why it crash :)

Could anyone who has VS2010+ fix it and compile?
maybe using this : https://github.com/pvpgn/pvpgn-magic-builder
https://tsw.vn.cz - TSW realm stats (& Quests, NotArmory, HC chars)