get_pid_by_dbus_name() : fix stderr show

This commit is contained in:
garywill 2024-04-20 20:48:05 +08:00
parent c376609896
commit fbad56f05c
1 changed files with 1 additions and 1 deletions

2
lnxrouter Normal file → Executable file
View File

@ -862,7 +862,7 @@ get_pid_by_dbus_name() {
which dbus-send >/dev/null 2>&1 || return 1 which dbus-send >/dev/null 2>&1 || return 1
pid="$( dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID string:$DBUS_NAME | grep " uint32 " | awk '{print $2}' )" 2>/dev/null pid="$( dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID string:$DBUS_NAME 2>/dev/null | grep " uint32 " | awk '{print $2}' )"
r=$? r=$?
echo "$pid" echo "$pid"