Skip to content

Commit 8ade113

Browse files
authored
Merge pull request #278 from dodevops/master
Moved the docker run command to a separate file in /usr/local/bin and…
2 parents b873c0c + 8271b5d commit 8ade113

File tree

4 files changed

+84
-84
lines changed

4 files changed

+84
-84
lines changed

manifests/run.pp

+14
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,17 @@
301301
case $docker::params::service_provider {
302302
'systemd': {
303303
$initscript = "/etc/systemd/system/${service_prefix}${sanitised_title}.service"
304+
$runscript = "/usr/local/bin/docker-run-${sanitised_title}.sh"
305+
$run_template = 'docker/usr/local/bin/docker-run.sh.erb'
304306
$init_template = 'docker/etc/systemd/system/docker-run.erb'
305307
$mode = '0640'
306308
}
307309
'upstart': {
308310
$initscript = "/etc/init.d/${service_prefix}${sanitised_title}"
309311
$init_template = 'docker/etc/init.d/docker-run.erb'
310312
$mode = '0750'
313+
$runscript = undef
314+
$run_template = undef
311315
}
312316
default: {
313317
if $::osfamily != 'windows' {
@@ -368,6 +372,16 @@
368372
}
369373
}
370374
else {
375+
if ($runscript) {
376+
file { $runscript:
377+
ensure => present,
378+
content => template($run_template),
379+
owner => 'root',
380+
group => $docker_group,
381+
mode => '0770'
382+
}
383+
}
384+
371385
file { $initscript:
372386
ensure => present,
373387
content => template($init_template),

0 commit comments

Comments
 (0)