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
Generic
Run the following command to create a source distribution:
python3 setup.py sdist
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
Close
Hashes for python3-cyberfusion-systemd-support-1.1.1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b0bd4182924ec7fb8c6ba4a2251b53eeecaca5e3e8476b59a781948ca17f86c |
|
MD5 | 6d4de006fdc6bf538d6739d4e23ec1ce |
|
BLAKE2b-256 | 45158b1cdd4a27746034bc1fa1658d8a63584ef90337e1a4742aabcf048b3756 |