https://github.com/stef/daemonize
create a simple skeleton for runit/daemontools services
https://github.com/stef/daemonize
Last synced: over 1 year ago
JSON representation
create a simple skeleton for runit/daemontools services
- Host: GitHub
- URL: https://github.com/stef/daemonize
- Owner: stef
- Created: 2012-08-19T15:02:04.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2013-07-09T22:35:13.000Z (almost 13 years ago)
- Last Synced: 2025-02-01T23:17:12.228Z (over 1 year ago)
- Language: Shell
- Size: 105 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* daemonize.sh
...is a simple script that bootstraps runit services. It copies an
optional skeleton creates the necessary supervise directories and
links for the service and an associated logger.
Skeletons mostly consist of a 'run' file and any settings and other
config files. For some examples see https://github.com/stef/tunnel-daemons
Running is simple:
#+BEGIN_SRC sh
./daemonize.sh service
#+END_SRC
This creates all necessary files in /etc/sv/service. Go and edit
/etc/sv/service/run to add the command line to start the service after
the exec. Make very sure that this service runs in the foreground,
otherwise you can easily create a forkbomb this way. Easiest to check
is by running ./run and making sure it does block and provide the
expected service.
Warning: This is only tested under debian, if you want to run it on other OSes
you should adapt your paths in the source.