Giter Club home page Giter Club logo

Comments (25)

devinSpitz avatar devinSpitz commented on June 27, 2024

Yeah, the panel will connect over ssh to the server that runs the Pavlov server. If you are inside a docker it will not be possible. My software does not support dockerized Pavlov servers like Vankrupt Games itself doesent support that.

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

But we can talk about that in the discord may we can get it to work but without restart/stop/Update and other features of servers.

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

forgot have ssh running in the container on its own port 2222

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

oh ok, that makes it more interesting :D ist systemd available there? PRW will make .service files and start and stop according to what you do on the web panel

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

no no system d, service works

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

Ah you did not set the server folder path for now xD Are you trying to add right not to create?

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

i am adding a existing one that is running.

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

So the plus button?:
image

Everything with a red number is needed do you have set all the vars?:
image

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

yep the plus, and yep have added all settings
image

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

thats new
image

as i said systemd does not work in containers but service does

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

yes that is a problem xD
it will try sudo systemctl restart ..... and sudo systemctl stop ...... and also makes a sudo file so it does not need to enter the password for these commands.

I would need to make a way to not force start and stop the server to check if it's working.

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

i can mess with creating bash aliases

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

possible yes :D I check the return values with regex for some stuff so make sure you succeed in these tests xD

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

Personaly better would be just a simple add with no support of restart stop or update just as monitoring :)

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

doing the alias failed. so planed update to add a check box for not adding/monitoring a service?
or check for init.d support as the ubuntu container supports it.

My setup all in the same container so ssh runs locally over 2222 (because i am using host networking)
If init.d is chosen the docker-compose setup can also include steamcmd for an all in one setup for those looking for it

also will follow up in the morning

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

Maybe init d support or no monitoring of the service.

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

awesome thank you

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

so i did make an init.d script if you wana go from there have an issue with the status command
hopefuly this gives you a start on it. will github my dockerfile soon

#!/bin/sh

### BEGIN INIT INFO
# Provides:          Pavlov
# Required-Start:    $local_fs $network $syslog
# Required-Stop:     $local_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Example
# Description:       Example start-stop-daemon - Debian
### END INIT INFO

NAME="pavlov"
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
APPDIR="/"
APPBIN="/startpavlov.sh"
USER="steam"
GROUP="steam"

# Include functions
set -e
. /lib/lsb/init-functions

start() {
  printf "Starting '$NAME'... "
  start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /run/$NAME.pid --chdir "$APPDIR" --exec "$APPBIN" || true
  printf "done\n"
}

#We need this function to ensure the whole process tree will be killed
killtree() {
    local _pid=$1
    local _sig=${2-TERM}
    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
        killtree ${_child} ${_sig}
    done
    kill -${_sig} ${_pid}
}

stop() {
  printf "Stopping '$NAME'... "
  [ -z `cat /run/$NAME.pid 2>/dev/null` ] || \
  while test -d /proc/$(cat /run/$NAME.pid); do
    killtree $(cat /run/$NAME.pid) 15
    sleep 0.5
  done
  [ -z `cat /run/$NAME.pid 2>/dev/null` ] || rm /run/$NAME.pid
  printf "done\n"
}

status() {
  status_of_proc -p /run/$name.pid /bin/bash /startpavlov.sh && exit 0 || exit $?
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  status)
    status
    ;;
  *)
    echo "Usage: $NAME {start|stop|restart|status}" >&2
    exit 1
    ;;
esac

exit 0

the contents of startpvalov.sh include everything including updating on startup/restart

#!/bin/bash
/usr/games/steamcmd +login anonymous +force_install_dir "/home/steam/pavlovserver" +app_update 622970 +exit
/usr/games/steamcmd +login anonymous +force_install_dir "/home/steam/pavlovserver" +app_update 1007 +quit
mkdir -p /home/steam/pavlovserver/pavlovserver/Pavlov/Binaries/Linux/
mkdir -p /home/steam/pavlovserver/.steam/sdk64
chmod +x /home/steam/pavlovserver/pavlovserver/PavlovServer.sh
cp /home/steam/pavlovserver/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so /home/steam/pavlovserver/.steam/sdk64/steamclient.so
cp /home/steam/pavlovserver/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so /home/steam/pavlovserver/pavlovserver/Pavlov/Binaries/Linux/steamclient.so
cd /home/steam/pavlovserver
./PavlovServer.sh

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

so i did make an init.d script if you wana go from there have an issue with the status command
hopefuly this gives you a start on it. will github my dockerfile soon

#!/bin/sh

### BEGIN INIT INFO
# Provides:          Pavlov
# Required-Start:    $local_fs $network $syslog
# Required-Stop:     $local_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Example
# Description:       Example start-stop-daemon - Debian
### END INIT INFO

NAME="pavlov"
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
APPDIR="/"
APPBIN="/startpavlov.sh"
USER="steam"
GROUP="steam"

# Include functions
set -e
. /lib/lsb/init-functions

start() {
  printf "Starting '$NAME'... "
  start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /run/$NAME.pid --chdir "$APPDIR" --exec "$APPBIN" || true
  printf "done\n"
}

#We need this function to ensure the whole process tree will be killed
killtree() {
    local _pid=$1
    local _sig=${2-TERM}
    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
        killtree ${_child} ${_sig}
    done
    kill -${_sig} ${_pid}
}

stop() {
  printf "Stopping '$NAME'... "
  [ -z `cat /run/$NAME.pid 2>/dev/null` ] || \
  while test -d /proc/$(cat /run/$NAME.pid); do
    killtree $(cat /run/$NAME.pid) 15
    sleep 0.5
  done
  [ -z `cat /run/$NAME.pid 2>/dev/null` ] || rm /run/$NAME.pid
  printf "done\n"
}

status() {
  status_of_proc -p /run/$name.pid /bin/bash /startpavlov.sh && exit 0 || exit $?
}

case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  status)
    status
    ;;
  *)
    echo "Usage: $NAME {start|stop|restart|status}" >&2
    exit 1
    ;;
esac

exit 0

the contents of startpvalov.sh include everything including updating on startup/restart

#!/bin/bash
/usr/games/steamcmd +login anonymous +force_install_dir "/home/steam/pavlovserver" +app_update 622970 +exit
/usr/games/steamcmd +login anonymous +force_install_dir "/home/steam/pavlovserver" +app_update 1007 +quit
mkdir -p /home/steam/pavlovserver/pavlovserver/Pavlov/Binaries/Linux/
mkdir -p /home/steam/pavlovserver/.steam/sdk64
chmod +x /home/steam/pavlovserver/pavlovserver/PavlovServer.sh
cp /home/steam/pavlovserver/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so /home/steam/pavlovserver/.steam/sdk64/steamclient.so
cp /home/steam/pavlovserver/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so /home/steam/pavlovserver/pavlovserver/Pavlov/Binaries/Linux/steamclient.so
cd /home/steam/pavlovserver
./PavlovServer.sh

Thanks thats awsome. I will do that for sure :)

Can you add some license? If not classified its under Copyright from you at least where i am xD

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

yep got what i needed to work, it builds will add a git repo soon of this combo docker image of the rconwebserver and steamcmd

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

https://github.com/noideaman/DockerPavlovRcon
added a license file in the repo
https://github.com/noideaman/DockerPavlovRcon/blob/main/pavlov the init.d script
https://github.com/noideaman/DockerPavlovRcon/blob/main/startpavlov.sh < the script init.d calls. you can remove all the chows, i am testing that it works with out that next

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

So all my scripts look to be clean and the service pavlov status command works now
even have one for the pavlovrconwebserver service

from pavlovrconwebserver.

devinSpitz avatar devinSpitz commented on June 27, 2024

So all my scripts look to be clean and the service pavlov status command works now
even have one for the pavlovrconwebserver service

Perfect :) Thanks i will check that out soon :)

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

Awesome thanks you for this, i am going test this out in my container now

from pavlovrconwebserver.

noideaman avatar noideaman commented on June 27, 2024

The services are still not being created
when testing it fails and i dont see it trying to log in via ssh at any point

Does the creating a pavlov instance use port 22? the docker service has it running on port 2222 for internal access
Screenshot 2022-07-10 at 16-46-41 Pavlov Rcon Webserver

I have port 2222 defined on the upper RCON instance
Screenshot 2022-07-10 at 16-45-50 Pavlov Rcon Webserver

the error after about 5 minutes
Screenshot 2022-07-10 at 16-56-20 Pavlov Rcon Webserver
output of pavlov this one had a different error
pavlovrconoutput.txt

unhandled

testing branch
https://github.com/noideaman/DockerPavlovRcon/tree/test

from pavlovrconwebserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.