mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +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
+11
-1
@@ -1,4 +1,8 @@
|
||||
# Sample Debian finit.conf
|
||||
# Sample finit.conf to demonstatre the syntax
|
||||
#
|
||||
# Comments are lines that start with #, comments are only allowed
|
||||
# on separate lines. The # sign is used inside service/run/task
|
||||
# stanzas to denote instance ID, see below.
|
||||
user admin
|
||||
host testbed
|
||||
|
||||
@@ -41,3 +45,9 @@ inetd time/udp wait [2345] internal -- UNIX rdate servic
|
||||
inetd time/tcp nowait [2345] internal -- UNIX rdate service
|
||||
inetd ssh@eth0:222/tcp nowait [2345] /usr/sbin/sshd -i -- SSH service
|
||||
inetd ssh/tcp nowait [2345] /usr/sbin/sshd -i -- SSH service
|
||||
|
||||
# For multiple instances of the same service, add #ID somewhere between
|
||||
# the service/run/task keyword and the command.
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user