{"id":19249233,"url":"https://github.com/sous-chefs/daemontools","last_synced_at":"2025-04-21T12:31:21.666Z","repository":{"id":44551393,"uuid":"283031096","full_name":"sous-chefs/daemontools","owner":"sous-chefs","description":"Development repository for the daemontools cookbook","archived":false,"fork":false,"pushed_at":"2024-02-01T01:08:45.000Z","size":143,"stargazers_count":4,"open_issues_count":3,"forks_count":3,"subscribers_count":21,"default_branch":"main","last_synced_at":"2024-04-14T11:03:39.502Z","etag":null,"topics":["chef","chef-cookbook","chef-resource","daemontools","hacktoberfest","managed-by-terraform"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/daemontools","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sous-chefs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"open_collective":"sous-chefs"}},"created_at":"2020-07-27T22:26:08.000Z","updated_at":"2023-11-28T06:09:27.000Z","dependencies_parsed_at":"2024-02-24T20:42:31.761Z","dependency_job_id":"6d0af52e-7cf3-4b72-bb53-f69cad83379b","html_url":"https://github.com/sous-chefs/daemontools","commit_stats":{"total_commits":121,"total_committers":18,"mean_commits":6.722222222222222,"dds":0.6694214876033058,"last_synced_commit":"76a2a37f9f09e4721fb4f0e01bb82c1dcea1a8b1"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fdaemontools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fdaemontools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fdaemontools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Fdaemontools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sous-chefs","download_url":"https://codeload.github.com/sous-chefs/daemontools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223859591,"owners_count":17215505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef","chef-cookbook","chef-resource","daemontools","hacktoberfest","managed-by-terraform"],"created_at":"2024-11-09T18:13:22.320Z","updated_at":"2024-11-09T18:13:22.784Z","avatar_url":"https://github.com/sous-chefs.png","language":"Ruby","funding_links":["https://opencollective.com/sous-chefs"],"categories":[],"sub_categories":[],"readme":"# Description\n\n[![Cookbook Version](https://img.shields.io/cookbook/v/daemontools.svg)](https://supermarket.chef.io/cookbooks/daemontools)\n[![Build Status](https://img.shields.io/circleci/project/github/sous-chefs/daemontools/master.svg)](https://circleci.com/gh/sous-chefs/daemontools)\n[![OpenCollective](https://opencollective.com/sous-chefs/backers/badge.svg)](#backers)\n[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)\n[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n\nInstalls [DJB's Daemontools](http://cr.yp.to/daemontools.html) and includes a service custom resource.\n\n## Requirements\n\n### Platform\n\nTested via [Test Kitchen](http://kitchen.ci).\n\n- Ubuntu 20.04\n- CentOS 7, 8\n- AmazonLinux 2\n- Gentoo\n- ArchLinux\n\nThis cookbook is known in the past to work on ArchLinux and Gentoo, but as they are rolling release distributions, it is difficult to ensure compatibility over time.\n\nMay work on other platforms with or without modification using the \"source\" installation method. See __Attributes__ and __Recipes__ below.\n\n### Depending Cookbooks\n\n- pacman - for `aur` recipe, on ArchLinux systems\n- build-essential - for `source` recipe\n\n#### Attributes\n\n- `node['daemontools']['bin_dir']` - Sets the location of the binaries for daemontools, default is selected by platform, or '/usr/local/bin' as a fallback.\n- `node['daemontools']['service_dir']` - Daemontools \"service\" directory where svscan will find services to manage.\n- `node['daemontools']['install_method']` - how to install daemontools, can be `source`, `package` or `aur` (for ArchLinux).\n- `node['daemontools']['start_svscan']` - whether to start `svscan` (includes the `svscan` recipe), `true` by default.\n- `node['daemontools']['package_name']` - name of the \"daemontools\" package, default value varies by platform.\n\n## Recipes\n\n### default\n\nThe default recipe includes the appropriate installation method's recipe using the `node['daemontools']['install_method']` attribute.\n\nIf the `start_svscan` attribute is true, then include the `svscan` recipe too.\n\n### package\n\nInstalls the `daemontools` package, using the `node['daemontools']['package_name']` attribute. On Debian family systems, this is `daemontools-run`, which depends on `daemontools` (and provides run time / init system configuration).\n\nOn other untested platforms (e.g., RHEL family), if a local `daemontools` package is built and it sets up the appropriate init system configuration (systemd, upstart, inittab), then this recipe will be sufficient. Otherwise, write a custom recipe.\n\n### aur\n\nUsed on ArchLinux systems to install daemontools from the Arch User Repository (AUR). Exits gracefully without exception if used on other platforms.\n\n### source\n\nThe source installation of daemontools should work on most other platforms that do not have a package available. A custom recipe may be required to configure the `svscan` service init script or upstart or systemd configuration.\n\n### svscan\n\nEnables and starts the `svscan` service. This requires that the local system have properly set up the `svscan` service for the appropriate init system. It's outside the scope of this cookbook to detect this for every possible platform, so a custom recipe may be required. For example, Debian family `daemontools-run` package provides this.\n\n## Resource\n\nThis cookbook includes a custom resource, `daemontools_service`, for managing services with daemontools. Examples:\n\n```ruby\ndaemontools_service \"tinydns-internal\" do\n  directory \"/etc/djbdns/tinydns-internal\"\n  template false\n  action [:enable,:start]\nend\n\ndaemontools_service \"chef-client\" do\n  directory \"/etc/sv/chef-client\"\n  template \"chef-client\"\n  action [:enable,:start]\n  log true\nend\n```\n\nDaemontools itself can perform a number of actions on services. The following are commands sent via the `svc` program. See its man page for more information.\n\n- start, stop, status, restart, up, down, once, pause, cont, hup, alrm, int, term, kill\n\nEnabling a service (`:enable` action) is done by setting up the directory located by the `directory` resource attribute. The following are set up:\n\n- `run` script that runs the service startup using the `template` resource attribute name.\n- `log/run` directory and script that runs the logger if the resource attribute `log` is true.\n- `finish` script, if specified using the `finish` resource attribute\n- `env` directory, containing ENV variables if specified with the `env` resource attribute\n- links the `node['daemontools']['service_dir']/service_name` to the `service_name` directory.\n\nThe default action is `:start` - once enabled daemontools services are started by svscan anyway.\n\nThe name attribute for the resource is `service_name`.\n\n## Usage\n\nInclude the daemontools recipe on nodes that should have daemontools installed for managing services. Use the `daemontools_service` custom resource for any services that should be managed by daemontools. In your cookbooks where `daemontools_service` is used, create the appropriate run and log-run scripts for your service. For example if the service is \"flowers\":\n\n```ruby\ndaemontools_service \"flowers\" do\n  directory \"/etc/sv/flowers\"\n  template \"flowers\"\n  action [:enable, :start]\n  log true\nend\n```\n\nCreate these templates in your cookbook:\n\n- `templates/default/sv-flowers-run.erb`\n- `templates/default/sv-flowers-log-run.erb`\n\nIf your service also has a finish script, set the resource attribute `finish` to true and create `sv-flowers-finish.erb`.\n\nThe content of the scripts should be appropriate for the \"flowers\" service.\n\n## Contributors\n\nThis project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890\u0026button=false)\n\n### Backers\n\nThank you to all our backers!\n\n![https://opencollective.com/sous-chefs#backers](https://opencollective.com/sous-chefs/backers.svg?width=600\u0026avatarHeight=40)\n\n### Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website.\n\n![https://opencollective.com/sous-chefs/sponsor/0/website](https://opencollective.com/sous-chefs/sponsor/0/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/1/website](https://opencollective.com/sous-chefs/sponsor/1/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/2/website](https://opencollective.com/sous-chefs/sponsor/2/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/3/website](https://opencollective.com/sous-chefs/sponsor/3/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/4/website](https://opencollective.com/sous-chefs/sponsor/4/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/5/website](https://opencollective.com/sous-chefs/sponsor/5/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/6/website](https://opencollective.com/sous-chefs/sponsor/6/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/7/website](https://opencollective.com/sous-chefs/sponsor/7/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/8/website](https://opencollective.com/sous-chefs/sponsor/8/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/9/website](https://opencollective.com/sous-chefs/sponsor/9/avatar.svg?avatarHeight=100)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsous-chefs%2Fdaemontools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsous-chefs%2Fdaemontools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsous-chefs%2Fdaemontools/lists"}