Config::Model::Systemd - Editor and validator for systemd configuration files
version 0.232.1
Requires App::Cme:
$ cme edit systemd-user $ cme check systemd-user # cme edit systemd # cme check systemd
use Config::Model qw/cme/; cme('systemd-user')->modify('socket:free-imap-tunnel Socket Accept=yes') ;
This module provides a configuration editor for the configuration file of systemd, i.e. all files in ~/.config/systemd/user/ or all files in /etc/systemd/system/
~/.config/systemd/user/
/etc/systemd/system/
Ok. I simplified. Actually, this module provides the configuration models of Systemd configuration file that cme, Config::Model and Config::Model::TkUI use to provide a configuration editor and checker.
The following command loads user systemd files (from ~/.config/systemd/user/ and launch a graphical editor:
cme edit systemd-user
Likewise, the following command loads system systemd configuration files and launch a graphical editor:
sudo cme edit systemd
You can also use cme to run sanity checks on the configuration file:
cme check systemd-user cme check systemd
As of Config::Model 2.086, a "cme(...)" in cme function is exported to modify configuration in a Perl program. For instance:
use Config::Model qw/cme/; # also import cme function # call cme for systemd-user, modify ans save my-imap-tunnel.socket file. cme('systemd-user')->modify('socket:my-imap-tunnel Socket Accept=yes') ;
Similarly, system Systemd files can be modified using systemd application:
systemd
use Config::Model qw/cme/; cme('systemd')->modify(...) ;
For more details and parameters, please see cme, modify, load and save documentation.
The list of supported parameters is extracted from the xml documentation provided by systemd project. This list is expected to be rather complete.
The properties of these parameters are inferred from the description of the parameters and are probably less accurate. In case of errors, please log a bug. .
For now, only unit, socket and service files are supported. Please log a wishlist bug if you need other unit types to be supported.
unit
socket
service
In case of issue, please log a bug on https://github.com/dod38fr/config-model-systemd/issues.
cme
Config::Model
http://github.com/dod38fr/config-model/wiki/Using-config-model
Dominique Dumont
This software is Copyright (c) 2015-2016 by Dominique Dumont.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.
Search CPAN
The default CPAN search engine, useful to view POD in HTML format.
http://search.cpan.org/dist/Config-Model-Systemd
AnnoCPAN
The AnnoCPAN is a website that allows community annotations of Perl module documentation.
http://annocpan.org/dist/Config-Model-Systemd
CPAN Ratings
The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
http://cpanratings.perl.org/d/Config-Model-Systemd
CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
http://cpants.cpanauthors.org/dist/Config-Model-Systemd
CPAN Testers
The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions.
http://www.cpantesters.org/distro/C/Config-Model-Systemd
CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
http://matrix.cpantesters.org/?dist=Config-Model-Systemd
CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
http://deps.cpantesters.org/?module=Config::Model::Systemd
Please report any bugs or feature requests by email to ddumont at cpan.org, or through the web interface at https://github.com/dod38fr/config-model-systemd/issues. You will be automatically notified of any progress on the request by the system.
ddumont at cpan.org
The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)
http://github.com/dod38fr/config-model-systemd
git clone git://github.com/dod38fr/config-model-systemd.git
To install Config::Model::Systemd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Model::Systemd
CPAN shell
perl -MCPAN -e shell install Config::Model::Systemd
For more information on module installation, please visit the detailed CPAN module installation guide.