Skip to content

Commit

Permalink
make code compatible with systemd 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Sep 5, 2023
1 parent 8ca4d87 commit 35e9b32
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion puppet/Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mod 'puppet/pbuilder', '1.0.0'
mod 'puppet/redis', '8.8.0'
mod 'puppet/rvm', '2.0.0'
mod 'puppet/selinux', '3.4.1'
mod 'puppet/systemd', '5.2.0'
mod 'puppet/systemd', '4.2.0'
mod 'puppet/unattended_upgrades', '7.1.0'
mod 'puppetlabs/apache', '8.6.0'
mod 'puppetlabs/apt', '9.0.2'
Expand Down
11 changes: 11 additions & 0 deletions puppet/modules/redmine/files/redmine.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Deployed with puppet
#

[Unit]
Description=redmine socket

[Socket]
ListenStream=3000

[Install]
WantedBy=sockets.target
26 changes: 10 additions & 16 deletions puppet/modules/redmine/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,11 @@
passenger_start_timeout => 600,
}
} else {
systemd::manage_unit {'redmine.socket':
ensure => 'present',
unit_entry => {
'Description' => 'redmine socket',
},
socket_entry => {
'ListenStream' => 3000,
},
install_entry => {
'WantedBy' => 'sockets.target',
},
systemd::unit_file {'redmine.socket':
ensure => 'present',
enable => true,
active => true,
content => file('redmine/redmine.socket'),
}

systemd::manage_unit{'redmine.service':
Expand All @@ -190,11 +184,11 @@
'Description' => 'redmine',
},
service_entry => {
'Type' => 'notify',
'User' => $username,
#'PrivateTmp' => true,
'WorkingDirectory' => $app_root,
'ExecStart' => "${app_root}/bin/rails server --environment production",
'Type' => 'notify',
'User' => $username,
'ExecStart' => "${app_root}/bin/rails server --environment production",
#'PrivateTmp' => true,
#'WorkingDirectory' => $app_root,
},
}

Expand Down

0 comments on commit 35e9b32

Please sign in to comment.