Packages

Pure Elixir tools for systemd unit files and D-Bus manager control

Current section

Files

Jump to
systemdkit examples timer.exs
Raw

examples/timer.exs

unit_file =
Systemd.UnitFile.parse!(""")
[Unit]
Description=Run example cleanup daily
[Timer]
OnCalendar=daily
Persistent=true
Unit=example-cleanup.service
[Install]
WantedBy=timers.target
""")
:ok = Systemd.UnitFile.validate(unit_file, :timer)
IO.write(Systemd.UnitFile.to_string(unit_file))