rebuild of systemd design
This commit is contained in:
parent
80dab60193
commit
523159f6c2
9 changed files with 122 additions and 20 deletions
|
|
@ -1,2 +0,0 @@
|
|||
[Unit]
|
||||
Description=Run Petrified Instanced Units via timers
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[Unit]
|
||||
Description=Daily petrified update
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
AccuracySec=1h
|
||||
Persistent=true
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Run petrified as %i
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/petrified
|
||||
User=%i
|
||||
|
||||
[Install]
|
||||
WantedBy=petrified.target
|
||||
32
systemd/system/petrified.service
Normal file
32
systemd/system/petrified.service
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# /usr/lib/systemd/system/petrified.service
|
||||
#
|
||||
# This unit is intended for out-of-the-box turnkey operation
|
||||
# and runs as the root user using the predefined defaults for
|
||||
# files and directories in /etc/petrified.conf
|
||||
#
|
||||
# The provided petrified.timer unit is what should be enabled,
|
||||
# not this service unit file directly:
|
||||
#
|
||||
# systemctl start petrified.timer
|
||||
# systemctl enable petrified.timer
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Run petrified in system mode
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/petrified -c /etc/petrified.conf
|
||||
|
||||
# A target is being provided in the case where the advanced
|
||||
# admin wants to override this unit with multiple config files
|
||||
# for multiple interfaces. In this use case, *both* the custom
|
||||
# service units and the timer are enabled with systemctl (as each
|
||||
# custom unit will not be called "petrified.service", instead
|
||||
# something like "petrified-wlp3s0.service")
|
||||
|
||||
[Install]
|
||||
WantedBy=petrified.target
|
||||
|
||||
10
systemd/system/petrified.target
Normal file
10
systemd/system/petrified.target
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# /usr/lib/systemd/system/petrified.target
|
||||
#
|
||||
# Note: If using a target to run mutliple service units, remember
|
||||
# to enable both the multiple unit files and the single timer.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Petrified units via timers
|
||||
|
||||
19
systemd/system/petrified.timer
Normal file
19
systemd/system/petrified.timer
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# /usr/lib/systemd/system/petrified.timer
|
||||
#
|
||||
# Note: Only one timer is needed if running multiple service
|
||||
# units for multiple interfaces. No need to duplicate.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Petrified update every 6 hours
|
||||
|
||||
[Timer]
|
||||
Unit=petrified.service
|
||||
OnCalendar=6h
|
||||
AccuracySec=1h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
32
systemd/user/petrified.service
Normal file
32
systemd/user/petrified.service
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# /usr/lib/systemd/user/petrified.service
|
||||
#
|
||||
# This unit is intended for out-of-the-box turnkey operation
|
||||
# and runs as the user using the predefined defaults for
|
||||
# files and directories in $HOME/.petrifiedrc
|
||||
#
|
||||
# The provided petrified.timer unit is what should be enabled,
|
||||
# not this service unit file directly:
|
||||
#
|
||||
# systemctl --user start petrified.timer
|
||||
# systemctl --user enable petrified.timer
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Run petrified as %u
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/petrified -c "%h/.petrifiedrc"
|
||||
|
||||
# A target is being provided in the case where the advanced
|
||||
# admin wants to override this unit with multiple config files
|
||||
# for multiple interfaces. In this use case, *both* the custom
|
||||
# service units and the timer are enabled with systemctl (as each
|
||||
# custom unit will not be called "petrified.service", instead
|
||||
# something like "petrified-wlp3s0.service")
|
||||
|
||||
[Install]
|
||||
WantedBy=petrified.target
|
||||
|
||||
10
systemd/user/petrified.target
Normal file
10
systemd/user/petrified.target
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# /usr/lib/systemd/user/petrified.target
|
||||
#
|
||||
# Note: If using a target to run mutliple service units, remember
|
||||
# to enable both the multiple unit files and the single timer.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Petrified units via timers as %u
|
||||
|
||||
19
systemd/user/petrified.timer
Normal file
19
systemd/user/petrified.timer
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# /usr/lib/systemd/user/petrified.timer
|
||||
#
|
||||
# Note: Only one timer is needed if running multiple service
|
||||
# units for multiple interfaces. No need to duplicate.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Petrified update every 6 hours as %u
|
||||
|
||||
[Timer]
|
||||
Unit=petrified.service
|
||||
OnCalendar=6h
|
||||
AccuracySec=1h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue