java-systemd icon indicating copy to clipboard operation
java-systemd copied to clipboard

Working in ability to enable and disable units

Open senderic opened this issue 3 years ago • 2 comments

  • Introduced a Struct and Pair class as needed by dbus-java
  • Updated various versions

I am labeling this version as 2.2.0-eks so if this commit is accepted, be sure to remove -eks.

FYI - For now, I needed to remove the -SNAPSHOT versioning since I will need to use this version in my system.


In a working state. Needed to also use a special struct class for the disableUnitFiles call (+3 squashed commit)

Squashed commit:

[9dde539] Found that enableUnitFiles may perform what I need to get units started.

The List<UnitFileChange> is not the proper return type. Some research lead me to AgNO3 project that uses a Tuple type of structure to hold the return type: https://github.com/AgNO3/code/blob/main/orchestrator/agent/system/eu.agno3.orchestrator.system.init.systemd/src/main/java/org/freedesktop/systemd1/Manager.java

Still experimenting...

[7197b50] WIP: TDD and fleshing out unit creation with dbus

[fb4e92d] Starting work towards creating/update/delete units

  • Specifically service units for now.
  • Using my own version number
  • Using lombok to reduce builder code. https://github.com/thjomnx/java-systemd/issues/6#issuecomment-1068341958

senderic avatar Mar 16 '22 20:03 senderic

FYI, not sure if you noticed: Issue https://github.com/thjomnx/java-systemd/issues/4 looks pretty much related.

Happy to see some attempt to fix it, as I didn't find the time ever since... :+1:

thjomnx avatar Mar 16 '22 21:03 thjomnx

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Aug 09 '23 20:08 sonarqubecloud[bot]