Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenRC service management script #27

Open
faithanalog opened this issue Jan 31, 2023 · 3 comments
Open

OpenRC service management script #27

faithanalog opened this issue Jan 31, 2023 · 3 comments

Comments

@faithanalog
Copy link

faithanalog commented Jan 31, 2023

Hey there, I'm working on packaging this for gentoo right now, and in the process I'm writing openrc and systemd services. Would you be interested in me upstreaming them here? I'm happy to work with you if you have any qualms with the way I implement them too.

@faithanalog faithanalog changed the title service management scripts? service management scripts Jan 31, 2023
@neocturne
Copy link
Owner

Hi,
for systemd there is already a unit that is used by many distros that package fastd: https://github.com/NeoRaider/fastd/blob/main/doc/examples/fastd%40.service

I'm not familiar with openrc - how specific would this be to Gentoo? If it is only useful for Gentoo, I'd rather not have it in the fastd repo. While there is an OpenWrt init script in this repo, I think adding it here was a mistake, as it is not compatible with all OpenWrt releases, and the OpenWrt package repo would actually be a more appropriate place...

@faithanalog
Copy link
Author

oh, I didn't think to check the examples for a service, thanks for that!

the most prominent use of OpenRC outside gentoo is probably Alpine Linux, where it is the default init system. Though you could use it on anything without too much effort, including the BSDs. but Alpine and Gentoo are the big ones where it's out of the box what someone would be using.

@faithanalog
Copy link
Author

faithanalog commented Feb 2, 2023

https://github.com/gentoo/guru/blob/master/net-vpn/fastd/files/fastd.init here's the openrc service file I ended up with for OpenRC btw, now that I've gotten it into guru (gentoo users' repo). This gets installed at /etc/init.d/fastd, and then a user (that is to say, me) symlinks it to /etc/init.d/fastd.whatever_vpn and runs rc-update add fastd.whatever_vpn default. The symlink + rc-update is analogous to systemctl enable fastd@whatever_vpn.service, and matches how the wg-quick openrc service works.

@faithanalog faithanalog changed the title service management scripts OpenRC service management script Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants