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
}
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
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 || :