Skip to content
This repository was archived by the owner on Jul 15, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ For more usage examples, have a look to the recipes in test/cookbooks/hipsnip-je
## Attributes

* `node["jetty"]["user"]` - name of the jetty user, default "jetty".
* `node["jetty"]["uid"]` - Numeric UID of the jetty user, default is to be dynamically allocated by the system.
* `node["jetty"]["group"]` - name of the jetty group, default "jetty".
* `node["jetty"]["gid"]` - Numeric GID of the jetty group, default is to be dynamically allocated by the system.
* `node["jetty"]["home"]` - location of the home directory of jetty, default "/usr/share/jetty".
* `node["jetty"]["port"]` - port number of where jetty listens, default 8080
* `node["jetty"]["args"]` - arguments pass to jetty at startup , default [], e.g: ["jetty.logs=/var/log/jetty"].
Expand Down Expand Up @@ -94,4 +96,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
4 changes: 3 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
# limitations under the License.
#
default['jetty']['user'] = 'jetty'
default['jetty']['uid'] = nil # Default behaviour is to allow the system to pick the UID dynamically
default['jetty']['group'] = 'jetty'
default['jetty']['gid'] = nil # Default behaviour is to allow the system to pick the GID dynamically
default['jetty']['home'] = '/usr/share/jetty'
default['jetty']['port'] = 8080
# The default arguments to pass to jetty.
Expand Down Expand Up @@ -48,4 +50,4 @@
default['jetty']['syslog']['tag'] = ''

default['jetty']['start_ini']['custom'] = false
default['jetty']['start_ini']['content'] = []
default['jetty']['start_ini']['content'] = []
6 changes: 6 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@
home node['jetty']['home']
shell '/bin/false'
system true
unless node['jetty']['uid'].nil?
uid node['jetty']['uid']
end
action :create
end

group node['jetty']['group'] do
members node['jetty']['user']
system true
unless node['jetty']['gid'].nil?
gid node['jetty']['gid']
end
action :create
end

Expand Down