CDIST-TYPE__SYSTEMD_UNIT(7)
π cdist-type__systemd_unit π
okay bestie, so this is cdist-type__systemd_unit β the cdist manual page for installing systemd units. yes it's a manual page, no it doesn't have to be boring. let's go π¦
β¨ NAME β¨
cdist-type__systemd_unit β install a systemd unit. that's it, that's the whole job. she's focused, she's iconic. π
πΈ DESCRIPTION πΈ
so this type manages systemd units in /etc/systemd/system/. she can install, enable and start a systemd unit. this is particularly useful on systems that lean on systemd super heavily (looking at you, CoreOS π). and if you wanna know more about what systemd units even are, go read SYSTEMD.UNIT(5). do your homework bestie, it's giving research. π
π REQUIRED PARAMETERS π
None. literally nothing required. she asks for nothing and gives you everything. π
π§ OPTIONAL PARAMETERS π§
enablement-stateβ one of'enabled','disabled'or'masked', and here's what each one means:enabledβ enables the unit. she's up, she's on, she's showing up to work. β¨disabledβ disables the unit. not today, bestie. πmaskedβ masks the unit. fully hidden, fully unavailable, ghost mode. π
sourceβ path to the config file. and ifsourceis'-'(a dash, yes just a lil dash), then she takes whatever was written to stdin as the config file content. lowkey genius. πstateβ'present'or'absent', defaults to'present'. so:presentβ the unit (or its mask) is installed.absentβ the unit is stopped, disabled and uninstalled. and if the unit was masked, the mask is removed. full unhaul. bye. π
π₯ BOOLEAN PARAMETERS π₯
restartβ Start the unit if it was inactive. Restart the unit if the unit file changed. Stop the unit if newenablement-stateismasked. she does the most, and honestly? we love that for her. π
π MESSAGES π
None. she's not a talker, she's a doer. no cap. π€
π EXAMPLES π
here's the tea, copy these exactly bestie:
# Installs, enables and starts foobar.service
__systemd_unit foobar.service \
--source "${__manifest}/files/foobar.service" \
--enablement-state enabled \
--restart
# Disables the unit
__systemd_unit foobar.service --enablement-state disabled
# Stops, disables and uninstalls foobar.service
__systemd_unit foobar.service --state absent
first one installs, enables and starts foobar.service with the full serve. second one just disables the unit. third one stops, disables and uninstalls foobar.service β a whole farewell tour. π«Ά
π AUTHORS π
Δ½ubomΓr KuΔera <lubomir.kucera.jr at gmail.com> β thank you for your service, legend. π
π COPYING π
Copyright (C) 2017 Δ½ubomΓr KuΔera. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
fr fr, if you're gonna pass it around, pass it around with the license. respect the paperwork. π
β COPYRIGHT β
ungleich GmbH 2021
okay that's the whole page, you're officially educated π this was cdist 7.0.0, dated Jul 31, 2022, and it's the CDIST-TYPE__SYSTEMD_UNIT(7) manual page. go forth and manage your units, bestie β you ate. periodt. π¦β¨
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms