Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/hgweb/manifests/init.pp

Issue 29370651: Issue 3065 - Make hgweb work with jessie (Closed)
Patch Set: For comments on TS with fred and ferris Created Jan. 4, 2017, 5 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/hgweb/files/hgweb.service ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/hgweb/manifests/init.pp
===================================================================
--- a/modules/hgweb/manifests/init.pp
+++ b/modules/hgweb/manifests/init.pp
@@ -152,10 +152,30 @@
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',
+ } ->
+
+ exec {'enable_initscript':
+ command => '/bin/systemctl enable hgweb.service',
+ user => root,
+ } ->
+
+ exec {'reload_daemon':
+ command => '/bin/systemctl daemon-reload',
+ user => root,
+ }
}
file {'/home/hg/web/robots.txt':
@@ -172,7 +192,7 @@
hasrestart => true,
hasstatus => false,
pattern => 'hgweb.fcgi',
- require => File['/etc/init.d/hgweb'],
+ require => File['init_script'],
subscribe => File['/etc/hgweb.ini'],
}
« no previous file with comments | « modules/hgweb/files/hgweb.service ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld