Index: modules/hgweb/manifests/init.pp |
=================================================================== |
--- a/modules/hgweb/manifests/init.pp |
+++ b/modules/hgweb/manifests/init.pp |
@@ -152,10 +152,20 @@ |
source => 'puppet:///modules/hgweb/hgweb.fcgi', |
} |
- file {'/etc/init.d/hgweb': |
- mode => 755, |
- require => File['/opt/hgweb.fcgi'], |
- source => 'puppet:///modules/hgweb/hgweb.sh', |
+ if $::operatingsystem == "Ubuntu" { |
+ file {'init_script': |
+ name => '/etc/init.d/hgweb', |
+ mode => 755, |
+ require => File['/opt/hgweb.fcgi'], |
+ source => 'puppet:///modules/hgweb/hgweb.sh', |
+ } |
+ } elsif $::operatingsystem == "Debian" { |
+ file {'init_script': |
+ name => '/etc/systemd/system/hgweb.service', |
+ mode => 755, |
+ require => File['/opt/hgweb.fcgi'], |
+ source => 'puppet:///modules/hgweb/hgweb.service', |
+ } |
} |
file {'/home/hg/web/robots.txt': |
@@ -172,7 +182,7 @@ |
hasrestart => true, |
hasstatus => false, |
pattern => 'hgweb.fcgi', |
- require => File['/etc/init.d/hgweb'], |
+ require => File['init_script'], |
subscribe => File['/etc/hgweb.ini'], |
} |