Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

[Feature Request]: New Enviroment Variable for `Unix Socket`

Open pineapples5972 opened this issue 1 year ago • 3 comments

Feature Description

Some servers has unix sockets dedicated to host their services. For example exposing /srv/http/ directory for users to deploy their services at here unix socket can be added to create https://spdf.myserver.xyz

So in current sitution we use socat to create unix socket at that location which listening for particular port i.e 8080 . /usr/bin/socat UNIX-LISTEN:/srv/http/spdf,mode=660,fork TCP:localhost:8080

And need systemd service file to run this constantly in bg

So this need can be eliminated with Enviromental variable for Systemd service file.

Why is this feature valuable?

For hosting without docker sometimes you need to add two service file

There shouldnt be need to run two systemd service files one for stirling pdf and second for unix socket There are applications which uses Envirment variable to be added into systemd Service file itself which saves this need.

Environment="SPDF_UNIX_SOCKET=/srv/http/spdf"

Suggested Implementation

Some program like calibre-web provide such env variable eg. Environment="CALIBRE_UNIX_SOCKET=/srv/http/calibre"

We can add similar env var for systemd service file Environment="SPDF_UNIX_SOCKET=/srv/http/spdf"

Additional Information

No response

No Duplicate of the Feature

  • [X] I have verified that there are no existing features requests similar to my request.

pineapples5972 avatar Jun 23 '24 14:06 pineapples5972

I will add this but will ask for you to test as I will be unable to!

Frooodle avatar Jun 23 '24 19:06 Frooodle

Hello,

There is a version fixed to implement this feature, I can test it to :) ?

Thank you,

MrErne avatar Sep 12 '24 09:09 MrErne

I will add this but will ask for you to test as I will be unable to!

Glad to test it.

pineapples5972 avatar Sep 13 '24 03:09 pineapples5972