Commit Graph

7 Commits

Author SHA1 Message Date
Darko Poljak 867b9cb102 shellcheck: SC2236: use -n instead of ! -z 2019-02-15 20:44:03 +01:00
Adam Dej 43982f821f __systemd_unit: add support for masking units 2018-07-11 16:22:36 +02:00
Adam Dej 37b37f6e66 __systemd_unit: fix crash when transitioning to state=absent
This type tried to disable an unit after it has removed it, which
failed. Now the removal happens in gencode-remote, after the unit has
been stopped and disabled.
2018-07-11 16:22:36 +02:00
Adam Dej 8d84834db6 __systemd_unit: manpage clarifications
Clarify that this type only operates on units in /etc/systemd/system.
Also, when state=present, it is not always true that the type is
"installed, enabled and started"
2018-07-11 16:16:08 +02:00
Jonas Weber dd188ca588 Handle stdin to __systemd_unit correctly
When directly piping in the source of a systemd unit file, cdist
errored out. This is due to not propagating the stdin file to the
underlying __config_file type (which already contains code for this
case, but this has to be duplicated in __systemd_unit).

The following example thus works:

    __systemd_unit test.service --source - <<EOF
    [Service]
    ExecStart=/bin/sleep 3600
    EOF
2018-01-21 09:12:45 +00:00
lubo 3397bcbf9b __systemd_unit improvements (#606)
* __systemd_unit: Move systemctl detection to manifest

* __systemd_unit: Restart the unit if inactive

Until now, the --restart parameter caused the unit to be restarted
only when the unit file has changed. This commit modifies --restart
behavior so that the unit is also restarted when the unit is inactive.

* __systemd_unit: Do not create unit file when source is empty
2017-12-29 17:06:48 +01:00
lubo b18327c520 Add __systemd_unit type (#589) 2017-11-07 13:25:37 +01:00