mirror of
https://github.com/troglobit/finit.git
synced 2026-10-28 12:30:44 +00:00
Add support for multiple instances of the same command
This patch adds support for starting and supervising multiple services (run, task, or service) using an extra #ID number. service #1 [2345] /sbin/httpd -f -h /http -p 80 -- Web server service #2 [2345] /sbin/httpd -f -h /http -p 8080 -- Old web server Also included in this patch is a fix for endless respawn of faulty services. For instance, a buggy daemon that crashes repeatedly will now be stopped after 10 respawns. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
687f52b0b5
commit
cb075560ed
8 files changed
+89
-109
No files matched your search
@@ -206,6 +206,16 @@ the `/path/to/cmd` should be executed with. Simply prefix the path with
|
||||
|
||||
run [2345] @joe:users /usr/bin/logger "Hello world"
|
||||
|
||||
For multiple instances of the same command, e.g. a DHCP client or
|
||||
multiple web servers, add `#ID` somewhere between the `run`, `task`,
|
||||
`service` keyword and the command, like this:
|
||||
|
||||
service #1 [2345] /sbin/httpd -f -h /http -p 80 -- Web server
|
||||
service #2 [2345] /sbin/httpd -f -h /http -p 8080 -- Old web server
|
||||
|
||||
Without the `#ID` to the service the latter will overwrite the former
|
||||
and only the old web server would be started and supervised.
|
||||
|
||||
|
||||
/etc/finit.d
|
||||
------------
|
||||
|
||||
Reference in new issue
Block a user