Documentation for pufferd templates?



  • Hello,

    First thing I have to say is that this panel is very well written and highly customizable but the problem is lack of cdocumentation.

    I've been trying for hours to get a normal SA:MP server to work because there is no documentation on how to create or edit templates.

    I've been editing the srcds.json template but I still don't know most of the functions I can add to the json.
    For example I don't know what these functons are in run (pre and post):

        "run": {
          "stop": "exit",
          "pre": [],
          "post": [],
          "arguments": [],
          "program": "./samp03svr"
        }
    

    Also is there a way of simulating Control-C because "exit" doesn't work on SAMP for stopping also is there a way of writing specific lines in the server.cfg
    for example I want to limit my users to 50 players and I don't want them to change that in the server.cfg but everything else is allowed.



  • Kinda new here, but i have a suggestion for limiting players. You could write a script which checks the server.cfg file on run, and edits it if it's not correct. ( I wonder if pre is used for running things before starting the server?)



  • We have not had time to write out the entire documentation for the new daemon because it's a massive amount of work and we're still making changes to it as we go.

    "pre" and "post" are meant to be commands that execute before a server starts and ends (respectfully) but they are not currently hooked up to the code to handle that.

    "program" is just the command to execute to start the server. We do not have a direct way to prevent a user from changing a file, nor can I think of a way to handle it while allowing them to change other aspects of the file.

    And we do not have a way to send control signals to the daemon to stop a program.



  • Thank you for the reply, I will look forward into making my own script which checks the contents of the server.cfg files.

    I wonder what types of "commands" do exist? As far as I know there are "mkdir", "download", "command", "move", "writefile".

    Also I wonder for what this is used

        "environment": {
          "type": "tty"
        },
    
    


  • The "commands" are those that you listed, each one is effectively an OS-agnostic (at best) to handle common functionality.

    Moving files for example is not the same on Windows and Linux, so it's meant to handle both cases for you.

    Write file does a similar job, just is an actual command instead of using "echo > file"

    The environment is the type of execution the job requires.

    For SRCDS servers, they require that they run in a tty, which is not handled the same as standard commandline. This environment is meant to in the future allow for some servers to run in docker or another "setup" while others don't.

    For now, it's there to handle the differences that SRCDS servers need compared to Minecraft servers.



  • Alright now I understand most about the templates, I'm going to experiment with this a little bit.

    Thank you again for the explanations you provided and I want to Thank you for developing PufferPanel it's one of the best free game panels you can find.


Log in to reply
 

Looks like your connection to PufferPanel Community was lost, please wait while we try to reconnect.