Any framework to support equivalence of systemd.socket
Does anyone know if there are any frameworks/programs around that will allow the .socket file technique from systemd to be used on Slack.
I'm fairly used to making applications that just use .service files run, as that's usually just the case of creating the right shell script to run the program. But the whole .socket concept used to then start a .service file is a whole different beast. Or (maybe) just some hints on the sequence of events in setting up the socket, the listener, and the handoff between the client (which I assume writes to the socket) and the server which is then started as a result. Cheers. |
https://www.freedesktop.org/software...md.socket.html
IMHO the whole thing has sense only when used with systemd, trying to port that logic to the Slackware init scripts will mean, at least, rewriting all of them from scratch, taking away muuuch more time than it's worth and with an end result that won't be even close to the goal (I strongly doubt something like that will work with a shell-based init system)... always remember the "if it's not broken don't fix it!"™️ golden rule! ;) |
I'd already read up on what the .socket files are. And I'm not trying to re-write any init scripts.
I'm trying to run a (compiled code only) application that uses a single .service file to run the system daemon (as root) and a .socket file to create a file-based socket to listen for commands from the user-land part sent to the daemon. Cheers. |
Won't Docker do that?
|
Quote:
if you need all of this just for an application, running it in a container, like enorbet suggested, could be enough. another alternative could be to implement what is written on the service file in another shell script written from scratch, but in that case, the shell script doesn't necessarily need to do everything described in the service files, behaving like systemd does (creating sockets, forking, etc., obviously depending on the application): I'll paste below, as an example, the httpd service file and /etc/rc.d/rc.httpd from Slackware Code:
[Unit] Code:
#!/bin/sh |
Quote:
Quote:
Quote:
Quote:
Cheers. |
it depends on what the daemon with root access does.
it's hard to try to understand what you need based on generic behaviours: maybe if you point at the application of which you are speaking of somebody could have a look at its specific behaviour. if you already have analyzed its specific behaviour, maybe trying to explain it in detail (what you expect in detail from the user space application, what specific actions the daemon performs, etc.) could help also. also, as this doesn't seem to have much to do with Slackware in particular, I suppose you might have a much better help in the programming section. |
Quote:
|
All times are GMT -5. The time now is 01:49 PM. |