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.
Hi, Im not sure if this repo is still being actively maintained, but if so, please see the following changes.
Changes
Breaking
exists()
to checksystemctl list-unit-files
. Units can exists here, but not have a statusFeatures
unit_list_full()
function which returns all three info columns fromsystemctl list-unit-files
as a vector of structs.unit_list_full()
now has the actually logic, withunit_list()
reducing the result to a vector of strings with names.unit_list()
andunit_list_full()
so you can filter for unit names. e.g.systemctl list-unit-files cron*
would only return units starting withcron
transient
as a field forUnit
struct, as it can appearCntrl PID
option for PIDFixes / Improvements
default-env
dependency, it's not needed and updatedsystemctl()
andsystemctl_capture()
function with native env variablesunit_list_full()
default()
thing, most of it can be derived and will save on codeUnit
if...else to.strip_prefix()
. It will return false if it doesnt work, or return back the value without prefix