Custom service from configuration

Hi, I really like how VyOS works. It is based on a runtime configuration, right? I need VyOS + a Python script to run. The Python script doesn’t have anything with routing to do, it is a kind of small server.

Is it possible to tweak the OS so I can include the Python script in the configuration file? For example add new configuration parameters like PythonScriptIP and PythonScriptPort, so every time the VyOS’ runtime configuration is loaded, it will see the two parameters and then run them as arguments in the background: python3 PythonScriptIP PythonScriptPort

Thanks in advance.

There are various ways you can run that after the initial install:

I would probably solve this by running your custom stuff through /config/scripts/vyos-postconfig-bootup.script:

You can also have your script running after each commit (and not only on boot):

Build a container and run it in vyos?

1 Like