update README/man for new systemd things
This commit is contained in:
parent
1ef76d3e40
commit
4fb35ecdf8
2 changed files with 37 additions and 49 deletions
38
README.pod
38
README.pod
|
|
@ -63,35 +63,31 @@ configuration.
|
||||||
user: systemctl --user --now enable petrified.timer
|
user: systemctl --user --now enable petrified.timer
|
||||||
systemctl --user list-timers petrified.timer
|
systemctl --user list-timers petrified.timer
|
||||||
|
|
||||||
A target of C<petrified.target> is pre-configured if multuple interfaces are
|
Multiple interfaces can be configured using the standard systemd semantics
|
||||||
to be configured; per standard systemd methodology the existing service unit
|
of unit overrides, which might look like this:
|
||||||
is first customized either at the system or user level, then all custom units
|
|
||||||
and the timer are started/enabled.
|
|
||||||
|
|
||||||
For example at the system level if two interfaces are to be used, it might
|
|
||||||
look like:
|
|
||||||
|
|
||||||
/etc/systemd/system/petrified-iface1.service
|
/etc/systemd/system/petrified-iface1.service
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
.include /usr/lib/systemd/system/petrified.service
|
.include /usr/lib/systemd/system/petrified.service
|
||||||
[Service]
|
[Service]
|
||||||
|
ExecStart=
|
||||||
ExecStart=/usr/bin/petrified -c /etc/petrified-iface1.conf
|
ExecStart=/usr/bin/petrified -c /etc/petrified-iface1.conf
|
||||||
|
|
||||||
/etc/systemd/system/petrified-iface2.service
|
The first C<ExecStart=> is intentional, needed to negate the existing value
|
||||||
|
first before defining a new value (systemd design for ExecStart override).
|
||||||
|
|
||||||
|
A corresponding new timer is then created to call this unit as it may be
|
||||||
|
desireable to run different interfaces on different time schedules, which
|
||||||
|
might then look like this:
|
||||||
|
|
||||||
|
/etc/systemd/system/petrified-iface1.timer
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
.include /usr/lib/systemd/system/petrified.service
|
.include /usr/lib/systemd/system/petrified.timer
|
||||||
[Service]
|
[Timer]
|
||||||
ExecStart=/usr/bin/petrified -c /etc/petrified-iface2.conf
|
Unit=petrified-iface1.service
|
||||||
|
OnCalendar=0/8:00:00
|
||||||
|
|
||||||
Then both customized service units are enabled, as well as the timer unit:
|
This timer will now operate the new custom unit when it's enabled.
|
||||||
|
|
||||||
systemctl --now enable petrified-iface1.service
|
|
||||||
systemctl --now enable petrified-iface2.service
|
|
||||||
systemctl --now enable petrified.timer
|
|
||||||
|
|
||||||
The per user configuration looks the same and is usually configured in the
|
|
||||||
F<~/.config/systemd/user/> space in the home directory. The provided units
|
|
||||||
for the service contain the connection to the target pre-configured.
|
|
||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
|
|
@ -101,8 +97,6 @@ L<http://www.freedesktop.org/software/systemd/man/systemd.unit.html>
|
||||||
|
|
||||||
L<http://www.freedesktop.org/software/systemd/man/systemd.timer.html>
|
L<http://www.freedesktop.org/software/systemd/man/systemd.timer.html>
|
||||||
|
|
||||||
L<http://www.freedesktop.org/software/systemd/man/systemd.target.html>
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head1 DEPENDENCIES
|
=head1 DEPENDENCIES
|
||||||
|
|
|
||||||
48
petrified.1
48
petrified.1
|
|
@ -129,7 +129,7 @@
|
||||||
.\" ========================================================================
|
.\" ========================================================================
|
||||||
.\"
|
.\"
|
||||||
.IX Title "PETRIFIED 1"
|
.IX Title "PETRIFIED 1"
|
||||||
.TH PETRIFIED 1 "2017-09-29" "petrified 2.0.0" "Petrified Manual"
|
.TH PETRIFIED 1 "2017-11-19" "petrified 2.0.0" "Petrified Manual"
|
||||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||||
.\" way too many mistakes in technical documents.
|
.\" way too many mistakes in technical documents.
|
||||||
.if n .ad l
|
.if n .ad l
|
||||||
|
|
@ -191,46 +191,40 @@ configuration.
|
||||||
\& systemctl \-\-user list\-timers petrified.timer
|
\& systemctl \-\-user list\-timers petrified.timer
|
||||||
.Ve
|
.Ve
|
||||||
.PP
|
.PP
|
||||||
A target of \f(CW\*(C`petrified.target\*(C'\fR is pre-configured if multuple interfaces are
|
Multiple interfaces can be configured using the standard systemd semantics
|
||||||
to be configured; per standard systemd methodology the existing service unit
|
of unit overrides, which might look like this:
|
||||||
is first customized either at the system or user level, then all custom units
|
|
||||||
and the timer are started/enabled.
|
|
||||||
.PP
|
.PP
|
||||||
For example at the system level if two interfaces are to be used, it might
|
.Vb 6
|
||||||
look like:
|
|
||||||
.PP
|
|
||||||
.Vb 5
|
|
||||||
\& /etc/systemd/system/petrified\-iface1.service
|
\& /etc/systemd/system/petrified\-iface1.service
|
||||||
\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
||||||
\& .include /usr/lib/systemd/system/petrified.service
|
\& .include /usr/lib/systemd/system/petrified.service
|
||||||
\& [Service]
|
\& [Service]
|
||||||
|
\& ExecStart=
|
||||||
\& ExecStart=/usr/bin/petrified \-c /etc/petrified\-iface1.conf
|
\& ExecStart=/usr/bin/petrified \-c /etc/petrified\-iface1.conf
|
||||||
\&
|
.Ve
|
||||||
\& /etc/systemd/system/petrified\-iface2.service
|
.PP
|
||||||
|
The first \f(CW\*(C`ExecStart=\*(C'\fR is intentional, needed to negate the existing value
|
||||||
|
first before defining a new value (systemd design for ExecStart override).
|
||||||
|
.PP
|
||||||
|
A corresponding new timer is then created to call this unit as it may be
|
||||||
|
desireable to run different interfaces on different time schedules, which
|
||||||
|
might then look like this:
|
||||||
|
.PP
|
||||||
|
.Vb 6
|
||||||
|
\& /etc/systemd/system/petrified\-iface1.timer
|
||||||
\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
\& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
||||||
\& .include /usr/lib/systemd/system/petrified.service
|
\& .include /usr/lib/systemd/system/petrified.timer
|
||||||
\& [Service]
|
\& [Timer]
|
||||||
\& ExecStart=/usr/bin/petrified \-c /etc/petrified\-iface2.conf
|
\& Unit=petrified\-iface1.service
|
||||||
|
\& OnCalendar=0/8:00:00
|
||||||
.Ve
|
.Ve
|
||||||
.PP
|
.PP
|
||||||
Then both customized service units are enabled, as well as the timer unit:
|
This timer will now operate the new custom unit when it's enabled.
|
||||||
.PP
|
|
||||||
.Vb 3
|
|
||||||
\& systemctl \-\-now enable petrified\-iface1.service
|
|
||||||
\& systemctl \-\-now enable petrified\-iface2.service
|
|
||||||
\& systemctl \-\-now enable petrified.timer
|
|
||||||
.Ve
|
|
||||||
.PP
|
|
||||||
The per user configuration looks the same and is usually configured in the
|
|
||||||
\&\fI~/.config/systemd/user/\fR space in the home directory. The provided units
|
|
||||||
for the service contain the connection to the target pre-configured.
|
|
||||||
.IP "\fBSee also:\fR" 4
|
.IP "\fBSee also:\fR" 4
|
||||||
.IX Item "See also:"
|
.IX Item "See also:"
|
||||||
<http://www.freedesktop.org/software/systemd/man/systemd.unit.html>
|
<http://www.freedesktop.org/software/systemd/man/systemd.unit.html>
|
||||||
.Sp
|
.Sp
|
||||||
<http://www.freedesktop.org/software/systemd/man/systemd.timer.html>
|
<http://www.freedesktop.org/software/systemd/man/systemd.timer.html>
|
||||||
.Sp
|
|
||||||
<http://www.freedesktop.org/software/systemd/man/systemd.target.html>
|
|
||||||
.SH "DEPENDENCIES"
|
.SH "DEPENDENCIES"
|
||||||
.IX Header "DEPENDENCIES"
|
.IX Header "DEPENDENCIES"
|
||||||
.Vb 7
|
.Vb 7
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue