Skip to content
Snippets Groups Projects
README.rst 786 B
Newer Older
Mr. Dmitry Makovey's avatar
Mr. Dmitry Makovey committed
=====================
Systemd-related tools
=====================


based on https://github.com/sgallagher/systemdunitparser toolkit provides means for automated
mass-change of systemd unit files

edit_systemd.py
===============

add
---

add section/option/value to systemd unit file

edit
----

using regular expression edit existing entry identified by section_re/option_re/value_search 

value is replaced with value_search/value_replace regexp combo (both are regexp expressions)

mutate
------

using regular expression mutate existing entry identified by section_re/option_re/value_search 

section/option/value is replaced with value_search/value_replace_str where value_search is regexp, and
value_replace_str is a python format string backreferencing groups from value_search