rpcd: add respawn param
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 7 Nov 2019 13:31:29 +0000 (14:31 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Mar 2020 08:16:43 +0000 (09:16 +0100)
The rpcd service is an important service, but if the service stops
working for any reason, no one will ever respawn that service. With this
commit, the procd service will monitor if the rpcd service
is running. If the rpcd service has crashed, then
procd respawns the rpcd service.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 432ec292ccc8b634facacbd018d08947d204225a)

package/system/rpcd/Makefile
package/system/rpcd/files/rpcd.init

index 853554b5a02d47507b0f486f2fe575356b0240b5..653c859ba10927b27b1c843abc7d577ec0401c51 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
index 77ebcbe6cb7b57cf80fb73b782007ab318ef9a78..b1061b906c111bba147008f820c8d8a403791928 100755 (executable)
@@ -12,6 +12,7 @@ start_service() {
 
        procd_open_instance
        procd_set_param command "$PROG" ${socket:+-s "$socket"} ${timeout:+-t "$timeout"}
+       procd_set_param respawn ${respawn_retry:-0}
        procd_close_instance
 }