Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] Tech Support → [Solved]PvPGN running on non-background process?

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 4

1

Topic: [Solved]PvPGN running on non-background process?

Currently, I'm using the following commands, in order to start the PvPGN server:

cd ~/pvpgn/sbin
./bnetd
./d2cs
./d2db

What I'm trying to do, is to make a shell, to keep the processes always running (with a `screen`):

#!/bin/sh

# Go to the directory
cd ~/pvpgn/sbin

# Blizzlike
if ! screen -list | grep -q "D2:BNETD"; then
    screen -dmS "D2:BNETD" ./bnetd
fi

if ! screen -list | grep -q "D2:D2CS"; then
    screen -dmS "D2:D2CS" ./d2cs
fi

if ! screen -list | grep -q "D2:D2DBS"; then
    screen -dmS "D2:D2DBS" ./d2dbs
fi

The problem is, that the `screen` processes always disappear, so I can't run it with a one-minute crontab (because it runs over and over again, showing an error, that the port is already in use).

Is there a way to run (for example) `bnetd`, on non-background process?

2

Re: [Solved]PvPGN running on non-background process?

I completely understand what you are trying to do and why... but my main question is - why is your BNETD/D2CS/D2DBS crashing so much that they need to be restarted?


Apart from ladder resets, ours stays up for months on end and never crashes.

Owner of SlashDiablo - One of the oldest and most well known Diablo II servers
Admin of Resurgence - Vanilla++ mod
Co-Founder of Hellforged - Diablo 09 built on 1.13 engine (current work in progress)
Founder of Diablo2.org - Dedicated Discord server for PvPGN/D2GS questions

3 (edited by htorbov 21.11.2017 01:40)

Re: [Solved]PvPGN running on non-background process?

Yes, indeed. I haven't messed with PvPGN since 2-3 years, but lastly, I remember that it was very stable. The problem in my case is the AC in our city - the server is standalone (personal), and it could restart. That's why I like to create crontabs with shells.

Anyway, I realized, that I don't need screen in PvPGN's case, and this would be enough:

#!/bin/sh

# Go to the directory
cd ~/pvpgn/sbin

# Blizzlike
if ! ps aux | pgrep "bnetd"; then
    ./bnetd
fi

if ! ps aux | pgrep "d2cs"; then
    ./d2cs
fi

if ! ps aux | pgrep "d2dbs"; then
    ./d2dbs
fi

4

Re: [Solved]PvPGN running on non-background process?

Nice, that script would do the job!


I'll mark this one as resolved.  GL!

Owner of SlashDiablo - One of the oldest and most well known Diablo II servers
Admin of Resurgence - Vanilla++ mod
Co-Founder of Hellforged - Diablo 09 built on 1.13 engine (current work in progress)
Founder of Diablo2.org - Dedicated Discord server for PvPGN/D2GS questions

Posts: 4

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 1 guest, 0 registered users

forums.pvpgn.pro → [EN] Tech Support → [Solved]PvPGN running on non-background process?