Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Commit

Permalink
issues-13: Make sure we specify the creation of a home directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Falkowski committed Nov 15, 2014
1 parent c5a9a32 commit ccbcc37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions recipes/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TEAMCITY_PASSWORD = node['teamcity']['password'].freeze
TEAMCITY_SERVICE_NAME = node['teamcity']['service_name'].freeze
TEAMCITY_GROUP = node['teamcity']['group'].freeze
TEAMCITY_HOME_PATH = "/home/#{TEAMCITY_USERNAME}".freeze
TEAMCITY_PATH = "/opt/TeamCity-#{TEAMCITY_VERSION}".freeze
TEAMCITY_SRC_PATH = "#{TEAMCITY_PATH}.zip".freeze
TEAMCITY_INIT_LOCATION = "/etc/init.d/#{TEAMCITY_SERVICE_NAME}".freeze
Expand All @@ -41,6 +42,8 @@
group TEAMCITY_GROUP

user TEAMCITY_USERNAME do
supports manage_home: true
home TEAMCITY_HOME_PATH
gid TEAMCITY_GROUP
shell '/bin/bash'
password TEAMCITY_PASSWORD
Expand Down
6 changes: 4 additions & 2 deletions recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TEAMCITY_PASSWORD = node['teamcity']['password'].freeze
TEAMCITY_SERVICE_NAME = node['teamcity']['service_name'].freeze
TEAMCITY_GROUP = node['teamcity']['group'].freeze
TEAMCITY_HOME_PATH = "/home/#{TEAMCITY_USERNAME}".freeze
TEAMCITY_PATH = "/opt/TeamCity-#{TEAMCITY_VERSION}".freeze
TEAMCITY_SRC_PATH = "#{TEAMCITY_PATH}.tar.gz".freeze
TEAMCITY_INIT_LOCATION = "/etc/init.d/#{TEAMCITY_SERVICE_NAME}".freeze
Expand All @@ -48,6 +49,8 @@
group TEAMCITY_GROUP

user TEAMCITY_USERNAME do
supports manage_home: true
home TEAMCITY_HOME_PATH
gid TEAMCITY_GROUP
shell '/bin/bash'
password TEAMCITY_PASSWORD
Expand Down Expand Up @@ -100,8 +103,7 @@
processed_backup_file = File.basename(backup_file, '.*').freeze
backup_path = ::File.join(TEAMCITY_BACKUP_PATH, backup_file).freeze
processed_backup_path = ::File.join(TEAMCITY_BACKUP_PATH, processed_backup_file).freeze
home_path = "/home/#{TEAMCITY_USERNAME}".freeze
home_database_props = ::File.join(home_path, TEAMCITY_DATABASE_PROPS_NAME).freeze
home_database_props = ::File.join(TEAMCITY_HOME_PATH, TEAMCITY_DATABASE_PROPS_NAME).freeze

remote_file backup_path do
source TEAMCITY_BACKUP_FILE
Expand Down

0 comments on commit ccbcc37

Please sign in to comment.