python3-cyberfusion-systemd-support 2.0.0__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/PKG-INFO +2 -2
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/pyproject.toml +1 -1
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/cyberfusion/SystemdSupport/units.py +24 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/python3_cyberfusion_systemd_support.egg-info/PKG-INFO +2 -2
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/README.md +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/setup.cfg +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/cyberfusion/SystemdSupport/__init__.py +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/cyberfusion/SystemdSupport/_constants.py +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/cyberfusion/SystemdSupport/manager.py +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/cyberfusion/SystemdSupport/tmp_files.py +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/python3_cyberfusion_systemd_support.egg-info/SOURCES.txt +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/python3_cyberfusion_systemd_support.egg-info/dependency_links.txt +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/python3_cyberfusion_systemd_support.egg-info/requires.txt +0 -0
- {python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/src/python3_cyberfusion_systemd_support.egg-info/top_level.txt +0 -0
{python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-cyberfusion-systemd-support
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Library for systemd.
|
|
5
5
|
Author-email: Cyberfusion <support@cyberfusion.io>
|
|
6
6
|
Project-URL: Source, https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support
|
|
@@ -108,6 +108,14 @@ class Unit:
|
|
|
108
108
|
"""Restart unit."""
|
|
109
109
|
subprocess.run([SYSTEMCTL_BIN, "restart", self.name], check=True)
|
|
110
110
|
|
|
111
|
+
@reload_manager
|
|
112
|
+
def start(self) -> None:
|
|
113
|
+
"""Start unit."""
|
|
114
|
+
if self.is_active:
|
|
115
|
+
return
|
|
116
|
+
|
|
117
|
+
subprocess.run([SYSTEMCTL_BIN, "start", self.name], check=True)
|
|
118
|
+
|
|
111
119
|
@reload_manager
|
|
112
120
|
def reload(self) -> None:
|
|
113
121
|
"""Reload unit."""
|
|
@@ -141,3 +149,19 @@ class Unit:
|
|
|
141
149
|
def get_drop_in_directory(unit_name: str) -> str:
|
|
142
150
|
"""Get unit override directory."""
|
|
143
151
|
return os.path.join(BASE_DIRECTORY_SYSTEMD_UNITS, unit_name + ".d")
|
|
152
|
+
|
|
153
|
+
@staticmethod
|
|
154
|
+
def remove_unit_type(unit_name: str) -> str:
|
|
155
|
+
"""Remove unit type from unit name.
|
|
156
|
+
|
|
157
|
+
E.g.: `firewall.service` -> `firewall`
|
|
158
|
+
"""
|
|
159
|
+
return unit_name.rsplit(".", 1)[0]
|
|
160
|
+
|
|
161
|
+
@staticmethod
|
|
162
|
+
def add_unit_type(unit_name: str, unit_type: str) -> str:
|
|
163
|
+
"""Add unit type to unit name.
|
|
164
|
+
|
|
165
|
+
E.g.: `firewall` -> `firewall.service`
|
|
166
|
+
"""
|
|
167
|
+
return unit_name + "." + unit_type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-cyberfusion-systemd-support
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Library for systemd.
|
|
5
5
|
Author-email: Cyberfusion <support@cyberfusion.io>
|
|
6
6
|
Project-URL: Source, https://github.com/CyberfusionIO/python3-cyberfusion-systemd-support
|
{python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/README.md
RENAMED
|
File without changes
|
{python3_cyberfusion_systemd_support-2.0.0 → python3_cyberfusion_systemd_support-2.2.0}/setup.cfg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|