Fix comments and timer
This commit is contained in:
parent
0f5e6de312
commit
1a7079fb11
1 changed files with 18 additions and 13 deletions
|
@ -61,10 +61,14 @@
|
|||
# String with nodejs version to install. Default 16.x
|
||||
#
|
||||
# [*manage_updater_task*]
|
||||
# Boolean indicating if this class should manage a scheduled task (Systemd Timer unit) to update Mastodon automatically. Requires a github token with read access to public repos.
|
||||
# Boolean indicating if this class should manage a scheduled
|
||||
# task (Systemd Timer unit) to update Mastodon automatically.
|
||||
# Requires a github token with read access to public repos.
|
||||
#
|
||||
# [*github_token*]
|
||||
# String with the Github token with read access to public repos.
|
||||
# WARNING! This token will be in plain text in the System unit
|
||||
# definition, so restrict it to only read public repos.
|
||||
#
|
||||
class mastodon (
|
||||
String $ensure = 'present',
|
||||
|
@ -556,19 +560,20 @@ class mastodon (
|
|||
enable => true,
|
||||
}
|
||||
|
||||
$_timer_updater = @("EOT")
|
||||
[Unit]
|
||||
Description=Mastodon - Updater
|
||||
|
||||
[Timer]
|
||||
OnBootSec=24min
|
||||
OnUnitActiveSec=1d
|
||||
Unit=mastodon_updater.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
| EOT
|
||||
if ($manage_updater_task and $github_token != '') {
|
||||
$_timer_updater = @("EOT")
|
||||
[Unit]
|
||||
Description=Mastodon - Updater
|
||||
|
||||
[Timer]
|
||||
OnBootSec=24min
|
||||
OnUnitActiveSec=1d
|
||||
Unit=mastodon_updater.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
| EOT
|
||||
|
||||
$_service_updater = @("EOT")
|
||||
[Service]
|
||||
Type=simple
|
||||
|
|
Loading…
Reference in a new issue