Skip to content

Commit

Permalink
Add ability to enable/disable odrive via parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mergwyn committed Aug 1, 2024
1 parent d157a12 commit e7b49e4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions site-modules/profile/manifests/app/odrive.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
#
class profile::app::odrive (
$users = ['gary'],
$enable = false,
) {
$codedir='/opt/odrive'

# automatically start daemon
systemd::unit_file { '[email protected]':
enable => true,
enable => $enable,,
active => false,
content => @("EOT"),
[Unit]
Expand All @@ -29,7 +30,7 @@
}

systemd::unit_file { '[email protected]':
enable => true,
enable => $enable,,
active => false,
content => @("EOT"),
[Unit]
Expand Down Expand Up @@ -73,13 +74,13 @@
$users.each |String $user| {
service { "odrive-agent@${user}":
ensure => 'running',
enable => true,
enable => $enable,,
require => Vcsrepo[$codedir],
# TODO notify and require?
}
service { "odrive-monitor@${user}":
ensure => 'running',
enable => true,
enable => $enable,,
require => Vcsrepo[$codedir],
# TODO notify and require?
}
Expand Down

0 comments on commit e7b49e4

Please sign in to comment.