diff options
author | Daniil Baturin <daniil@baturin.org> | 2023-04-15 02:59:20 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2023-05-05 21:31:18 +0100 |
commit | dd34652631caa140b9d5edbe2336643ebe14666d (patch) | |
tree | dbba7ffc4b47b3a5528388b5e6a267e03017dd84 /scripts/vyatta-monitor-list | |
parent | 87742e42c71da5a48633fb22df831aa2b7403bd8 (diff) | |
download | vyatta-op-dd34652631caa140b9d5edbe2336643ebe14666d.tar.gz vyatta-op-dd34652631caa140b9d5edbe2336643ebe14666d.zip |
T671: remove scripts that are not used by anything
* vyatta-gettime.pl
* vyatta-show-current-user
* vyatta-regen-unpriv-commands.sh
* vyatta-monitor-list
Diffstat (limited to 'scripts/vyatta-monitor-list')
-rw-r--r-- | scripts/vyatta-monitor-list | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/scripts/vyatta-monitor-list b/scripts/vyatta-monitor-list deleted file mode 100644 index 6862f03..0000000 --- a/scripts/vyatta-monitor-list +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -declare CURRENT_PTS=$(tty | sed -e s-/--g -e s/dev//g) -declare CURRENT_UID=$(id -u) -declare -a MPIDS -MPIDS=( $(ls /var/run/vyatta/monitor/*.pid 2>/dev/null) ) - -for pidfile in "${MPIDS[@]}"; do - pid=$(<$pidfile) - procname=$(cat /proc/$pid/cmdline 2>/dev/null) - if [[ "$procname" =~ "tail" ]] ; then - pts=${pidfile##*-pts} - pts=${pts%%.pid} - if [[ "pts$pts" == "$CURRENT_PTS" ]]; then - if cat /proc/$pid/status | grep -q "Uid:.*$CURRENT_UID" ; then - print=${pidfile##*/} - print=${print%%-pts$pts*} - echo $print - fi - fi - fi -done |