Library for systemd.
Project description
python3-cyberfusion-systemd-support
Library for systemd.
Install
PyPI
Run the following command to install the package from PyPI:
pip3 install python3-cyberfusion-systemd-support
Next, ensure you are working on a system that ships systemd.
Debian
Run the following commands to build a Debian package:
mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc
Configure
No configuration is supported.
Usage
Units
from cyberfusion.SystemdSupport.units import Unit
unit = Unit(f"example.{Unit.SUFFIX_SERVICE}")
unit.disable()
unit.stop()
unit.enable()
unit.restart()
unit.reload()
print(unit.is_active)
print(unit.is_enabled)
Tmp files
from cyberfusion.SystemdSupport.tmp_files import TmpFileConfigurationLine, TmpFileConfigurationFile
tmp_file_configuration_line = str(TmpFileConfigurationLine(type_="d", path="/tmp/example", mode="0755", user="example", group="example"))
tmp_file_configuration_file = TmpFileConfigurationFile(path="/etc/tmpfiles.d/example.conf")
tmp_file_configuration_file.create()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python3_cyberfusion_systemd_support-1.1.1.3.tar.gz
.
File metadata
- Download URL: python3_cyberfusion_systemd_support-1.1.1.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc02c04edbcc63bde12700ced80aebd47698929bf5660cefcf7ca10f567607ba |
|
MD5 | ea29e27dc885595a8bce6e6b02055610 |
|
BLAKE2b-256 | 9700eff8e0925c3c181e7e0840951c77047cf3cdb9dc81112bcaf52653b7c47f |
File details
Details for the file python3_cyberfusion_systemd_support-1.1.1.3-py3-none-any.whl
.
File metadata
- Download URL: python3_cyberfusion_systemd_support-1.1.1.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 737b911d40ae37df73ad7afc2557ce1063fc61480486028cf2a046189af9bc3f |
|
MD5 | 22104c585116ff680e60f88d6c726aee |
|
BLAKE2b-256 | fe1c2b3dc99745953ac788280e485e7726a26dee8c4d81e22fb2ea78e72acb42 |