Skip to content

Commit

Permalink
Merge pull request #7 from sbitio/systemd-paths
Browse files Browse the repository at this point in the history
Fix #6. Systemd file paths differs on Debian and Redhat/Centos
  • Loading branch information
NITEMAN committed Jul 6, 2015
2 parents e248c1d + ebef18c commit c17b3c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifests/check/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
$initd = undef,
$sysv_file = "/etc/init.d/${name}",
$upstart_file = "/etc/init/${name}.conf",
$systemd_file = "/usr/lib/systemd/system/${name}.service",
$systemd_file = "${monit::systemd_prefix}${name}${monit::systemd_suffix}",

# Params for process type.
$pidfile = undef,
Expand Down
8 changes: 6 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
$init_system = 'sysv'
}
else {
$init_system = 'systemd'
$init_system = 'systemd'
$systemd_prefix = '/etc/init.d/'
$systemd_suffix = ''
}
}
'Ubuntu': {
Expand All @@ -51,7 +53,9 @@
$init_system = 'sysv'
}
else {
$init_system = 'systemd'
$init_system = 'systemd'
$systemd_prefix = '/usr/lib/systemd/system/'
$systemd_suffix = '.service'
}
}
default: {
Expand Down

0 comments on commit c17b3c3

Please sign in to comment.