criteo-cookbooks / nssm

Licence: MIT License
Chef cookbook to install the Non-Sucking Service Manager

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to nssm

web-dev-blog
Мой блог на русском
Stars: ✭ 99 (+725%)
Mutual labels:  chef
chef-client
Development repository for Chef Client cookbook
Stars: ✭ 181 (+1408.33%)
Mutual labels:  chef
rundeck
Development repository for the rundeck cookbook
Stars: ✭ 45 (+275%)
Mutual labels:  chef
golang
Development repository for the golang cookbook
Stars: ✭ 48 (+300%)
Mutual labels:  chef
stunnel
Development repository for the stunnel cookbook
Stars: ✭ 14 (+16.67%)
Mutual labels:  chef
selinux policy
Development repository for the selinux_policy cookbook
Stars: ✭ 17 (+41.67%)
Mutual labels:  chef
auditd
Install and configure user mode auditd tools
Stars: ✭ 31 (+158.33%)
Mutual labels:  chef
smartmontools
Development repository for the smartmontools cookbook
Stars: ✭ 12 (+0%)
Mutual labels:  chef
chef-ingredient
Primitives for managing Chef products and packages
Stars: ✭ 43 (+258.33%)
Mutual labels:  chef
mysql tuning-cookbook
Chef cookbook to create MySQL configuraiton files better suited for your system.
Stars: ✭ 23 (+91.67%)
Mutual labels:  chef
owncloud-cookbook
Chef cookbook to install and configure ownCloud.
Stars: ✭ 39 (+225%)
Mutual labels:  chef
chef-icinga2
Icinga 2 Chef Cookbook
Stars: ✭ 42 (+250%)
Mutual labels:  chef
rsync
Development repository for the rsync cookbook
Stars: ✭ 25 (+108.33%)
Mutual labels:  chef
jenkins-pipeline-global-library-chefci
Jenkins Pipeline's "Workflow Global Libs" for Chef CI
Stars: ✭ 60 (+400%)
Mutual labels:  chef
push-jobs-cookbook
Development repository for Chef Cookbook push-jobs
Stars: ✭ 21 (+75%)
Mutual labels:  chef
chef-mysql-hardening
This chef cookbook provides security configuration for mysql.
Stars: ✭ 23 (+91.67%)
Mutual labels:  chef
chef-nginx-hardening
This chef cookbook provides secure nginx configurations.
Stars: ✭ 50 (+316.67%)
Mutual labels:  chef
jenkinsfile cookbook pipeline
Example Jenkinsfile and Explaination for Chef Cookbook Development
Stars: ✭ 36 (+200%)
Mutual labels:  chef
sysctl
Development repository for the sysctl cookbook
Stars: ✭ 43 (+258.33%)
Mutual labels:  chef
chef-handler-sns
Chef report handler to send Amazon SNS notifications on failures or changes.
Stars: ✭ 12 (+0%)
Mutual labels:  chef

NSSM Cookbook

Cookbook Version Build Status

This cookbook installs the Non-Sucking Service Manager (http://nssm.cc), and exposes resources to install and remove Windows services.

Requirements

  • Chef 12.7+

Platform

  • Windows

Usage

Add recipe[nssm] to run list.

Quick Start

To install a Windows service:

nssm 'service name' do
  program 'C:\Windows\System32\java.exe'
  args '-jar C:/path/to/my-executable.jar'
  action :install
end

To remove a Windows service:

nssm 'service name' do
  action :remove
end

Using Parameters

A parameter is a hash key representing the same name as the registry entry which controls the associated functionality. So, for example, the following sets the Startup directory, I/O redirection, and File rotation for a service:

nssm 'service name' do
  program 'C:\Windows\System32\java.exe'
  args '-jar C:/path/to/my-executable.jar'
  parameters(
    AppDirectory: 'C:/path/to',
    AppStdout: 'C:/path/to/log/service.log',
    AppStderr: 'C:/path/to/log/error.log',
    AppRotateFiles: 1
  )
  action %i[install start]
end

Attributes

  • node['nssm']['src'] - This can either be a URI or a local path to nssm zip.
  • node['nssm']['sha256'] - SHA-256 checksum of the file. Chef will not download it if the local file matches the checksum.

Resource/Provider

Actions

  • install - Install a Windows service, and update it accordingly. (Note: it will NOT automatically restart the service, make sure to notify the according service to restart)
  • install_if_missing - Install a Windows service, but do not update it if present (old behaviour)
  • remove - Remove Windows service.
  • start - Start the Windows service.
  • stop - Stop the Windows service.

Attribute Parameters

  • servicename - Name attribute. The name of the Windows service.
  • program - The program to be run as a service.
  • args - String of arguments for the program. Optional
  • parameters - Hash of key value pairs where key represents associated registry entry. Optional
  • start - Start service after installing. Default - true
  • nssm_binary - Path to nssm binary. Default - node['nssm']['install_location']\nssm.exe

Getting Help

Contributing

Please refer to CONTRIBUTING.

License

MIT - see the accompanying LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].