Skip to content

Commit

Permalink
portal-ext.properties templaet for database
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzorin committed Jan 12, 2013
1 parent e2eaaaa commit 9d05d99
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
40 changes: 26 additions & 14 deletions manifests/smartforms/client_liferay.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,49 @@
}

exec { 'wget-liferay':
command => "/usr/bin/wget --output-document=/home/liferay/liferay.zip ${lr_dl}",
creates => '/home/liferay/liferay.zip',
group => 'liferay',
user => 'liferay',
command => "/usr/bin/wget --output-document=/home/${web_user}/liferay.zip ${lr_dl}",
creates => "/home/${web_user}/liferay.zip",
group => "${web_user}",
user => "${web_user}",
require => Package['wget'],
}

exec { 'unzip-liferay':
command => '/usr/bin/unzip -o /home/liferay/liferay.zip',
user => 'liferay',
group => 'liferay',
cwd => '/home/liferay/',
command => "/usr/bin/unzip -o /home/${web_user}/liferay.zip",
user => "${web_user}",
group => "${web_user}",
cwd => "/home/${web_user}/",
creates => "${lr_root}",
require => Package['unzip'],
}

file { '/home/liferay/liferay-portal':
file { "/home/${web_user}/liferay-portal":
ensure => 'link',
target => "${lr_root}",
owner => 'liferay',
group => 'liferay',
owner => "${web_user}",
group => "${web_user}",
}

Exec['unzip-liferay'] -> File['/home/liferay/liferay-portal']
Exec['unzip-liferay'] -> File["/home/${web_user}/liferay-portal"]
}

class myoffice::smartforms::client_liferay::configure {
file { "/home/${web_user}/liferay-portal/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties":
owner => "${web_user}",
group => "${web_user}",
content => template('myoffice/portal-ext.erb')
}
}

class myoffice::smartforms::client_liferay(
$lr_dl = $myoffice::smartforms::client_params::lr_dl,
$lr_root = $myoffice::smartforms::client_params::lr_root,
$lr_dl = $myoffice::smartforms::client_params::lr_dl,
$lr_root = $myoffice::smartforms::client_params::lr_root,
$web_user = $myoffice::smartforms::client_params::web_user,
) inherits myoffice::smartforms::client_params {

class { 'myoffice::smartforms::client_liferay::get': }
class { 'myoffice::smartforms::client_liferay::configure': }

Class['myoffice::smartforms::client_liferay::get'] -> Class['myoffice::smartforms::client_liferay::configure']

}
4 changes: 4 additions & 0 deletions templates/portal-ext.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/<%= @db_name %>?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=<%= @db_user %>
jdbc.default.password=<%= @db_pass %>

0 comments on commit 9d05d99

Please sign in to comment.