mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
dropbear: Name pid file by uci section name
Name the pidfile of each dropbear instance according to the corresponding uci section name. This enables a 1:1 mapping between the definition of the service instance and its process. Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu> Link: https://github.com/openwrt/openwrt/pull/15177 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
3bd2cee9bf
commit
a2f0cd35ac
@ -8,7 +8,6 @@ STOP=50
|
|||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
PROG=/usr/sbin/dropbear
|
PROG=/usr/sbin/dropbear
|
||||||
NAME=dropbear
|
NAME=dropbear
|
||||||
PIDCOUNT=0
|
|
||||||
|
|
||||||
extra_command "killclients" "Kill ${NAME} processes except servers and yourself"
|
extra_command "killclients" "Kill ${NAME} processes except servers and yourself"
|
||||||
|
|
||||||
@ -298,8 +297,7 @@ dropbear_instance()
|
|||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
PIDCOUNT="$(( ${PIDCOUNT} + 1))"
|
local pid_file="/var/run/${NAME}.${1}.pid"
|
||||||
local pid_file="/var/run/${NAME}.${PIDCOUNT}.pid"
|
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command "$PROG" -F -P "$pid_file"
|
procd_set_param command "$PROG" -F -P "$pid_file"
|
||||||
|
Loading…
Reference in New Issue
Block a user