X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=brc;h=bd76bb4c8265890c517bdff5f501556ed0d76bcb;hp=e0f2a883d209344e04e4c5a7d4b4bc9cd46d0726;hb=6cc73025405b7a540eec371d1d8f7d9d13d8e019;hpb=56c55d8e02cdd6ec67d2fe53cc03785d8876442e diff --git a/brc b/brc index e0f2a88..bd76bb4 100644 --- a/brc +++ b/brc @@ -238,8 +238,7 @@ export SL_INFO_DIR=/p/sshinfo if [[ -s $bashrc_dir/path-add-function ]]; then source $bashrc_dir/path-add-function if [[ $SSH_CLIENT ]]; then - # [[ -d /home/iank/.iank/e/e ]] mounts it unnecessarily, so use this. - if grep -qF /home/iank/.iank/e/e /etc/auto.iank /etc/exports &>/dev/null; then + if grep -qF /home/iank/.iank/e/e /etc/exports &>/dev/null; then export EMACSDIR=/home/iank/.iank/e/e fi path-add $bashrc_dir @@ -1321,6 +1320,13 @@ rsu() { # [OPTS] HOST PATH } ccomp rsync rsd rsa rst rsu +# find programs listening on a port +ssp() { + local port=$1 + # to figure out these args, i had to look at the man page from git version, as of 2022-04. + s ss -lpn state listening sport = $port +} + resolvcat() { local f if [[ $(systemctl is-active nscd ||:) != inactive ]]; then @@ -1328,7 +1334,7 @@ resolvcat() { fi f=/etc/resolv.conf echo $f:; ccat $f - hr; s ss -lpn 'sport = 53' + hr; s ss -lpn sport = 53 if systemctl is-enabled dnsmasq &>/dev/null || [[ $(systemctl is-active dnsmasq ||:) != inactive ]]; then # this will fail is dnsmasq is failed hr; m ser status dnsmasq | cat || :