|
@ -31,14 +31,14 @@ start_service() |
|
|
|
|
|
|
|
|
reload_service() |
|
|
reload_service() |
|
|
{ |
|
|
{ |
|
|
local ppid pid |
|
|
|
|
|
|
|
|
local ppid pid timeout="$(uci_get travelmate global trm_timeout)" |
|
|
|
|
|
|
|
|
if [ -s "${trm_pidfile}" ] |
|
|
if [ -s "${trm_pidfile}" ] |
|
|
then |
|
|
then |
|
|
ppid="$(cat "${trm_pidfile}" 2>/dev/null)" |
|
|
ppid="$(cat "${trm_pidfile}" 2>/dev/null)" |
|
|
if [ -n "${ppid}" ] |
|
|
if [ -n "${ppid}" ] |
|
|
then |
|
|
then |
|
|
pid="$(pgrep sleep -P ${ppid} 2>/dev/null)" |
|
|
|
|
|
|
|
|
pid="$(pgrep -xnf "sleep ${timeout:-60} 0" -P ${ppid} 2>/dev/null)" |
|
|
if [ -n "${pid}" ] |
|
|
if [ -n "${pid}" ] |
|
|
then |
|
|
then |
|
|
kill -INT ${pid} 2>/dev/null |
|
|
kill -INT ${pid} 2>/dev/null |
|
|