Closed LibreHacker closed 3 years ago
Hi!
Yes, I think so. Just out of curiosity, where are you planning to use it? Gentoo, AlpineLinux, ...?
Hi, @gustavo-iniguez-goya !
I'm using Artix Linux, it's having s6 and openrc too.
I was thinking about this, and while I can create an init script for Artix, wouldn't it better to ask Artix devs/packagers to package opensnitch for the distro? I'm not planning in packaging opensnitch for Arch, because it's already packaged https://aur.archlinux.org/packages/opensnitch-git/
What do you think?
Arch uses systemd, so there's no need for other init systems there.
@gustavo-iniguez-goya I think Artix packages do not planning to add opensnitch to repos. https://forum.artixlinux.org/index.php/topic,2011.msg13446.html
Ok @LibreHacker , I can write an init script but how are you going to install it? Could you use the AUR package from Arch?
I ask you this because I think we should not duplicate efforts, and reuse what is already working. Would someone (from Arch/Artix) be willing to package it for Artix if I create the init scripts? Maybe AUR opensnitch packager?
Having it packaged for a distro and added to the distro repositories ease the end user experience. Think that in order to update the package you should download it from here (which is the case for deb/rpm packages unfortunately), which is a pain... and not optimal.
I mention this issue in AUR, PKGBUILD having systemd strings, but i think adding new s6 script not broken work with systemd
Sorry @LibreHacker , this is out of scope and it's not going to be supported for now.
I think that you could create a s6 service like this:
opensnitchd-srv/
run.user
run
run.user:
#!/usr/bin/execlineb -P
foreground { touch /var/log/opensnitchd.log }
foreground { mkdir -p /etc/opensnitchd/rules/ }
fdmove -c 2 1
exec /usr/bin/opensnitchd -rules-path /etc/opensnitchd/rules/
run:
#!/usr/bin/execlineb -P
fdmove 1 0
s6-fdholder-retrieve ../s6rc-fdholder/s "pipe:s6rc-w-opensnitchd-log"
fdswap 0 1
./run.user
I think that you have also to recreate the init db, etc... but I have no idea really. Try asking on Artix forum and see if they help you. Good luck!
Please re-open, there is no clear way to run with openrc
You can add support init systems like OpenRC and s6?
https://wiki.gentoo.org/wiki/OpenRC https://www.skarnet.org/software/s6/