Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for an OpenRC user service for appimagelauncherd. By default, it builds exactly the same as currently, however an optional
-DSERVICE_TYPE="openrc"flag can be adding during the build process to build the OpenRC service instead of the System-D service.This allows maintainers of OpenRC-based systems to build with this flag if they wish, without affecting existing System-D based builds. It also allows support for future init systems to be added easily.
The only change made within the program itself is how the service is toggled, since OpenRC uses different commands for that. I added the changes with two define macros,
SERVICE_TYPE_SYSTEMDandSERVICE_TYPE_OPENRCwhich adds support for the respective init system. These macros are automatically handled by CMake.While working on this I found a few bugs which made the build process difficult, so expect a PR to for those soon.