X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=brc2;h=e392cf5c0a56d56b882bdb126aa7ff5c01185428;hp=c233c9288354125d0d679f04deee6ee862666188;hb=802e885e3e7fa3857f8bc4f54c261d5ca76f2454;hpb=40dd151ec6ba75633c74568da59e35a45351f194 diff --git a/brc2 b/brc2 index c233c92..e392cf5 100644 --- a/brc2 +++ b/brc2 @@ -1647,18 +1647,24 @@ enn() { sdnbash() { # systemd namespace bash local unit=$1 - m sudo nsenter -t $(systemctl show --property MainPID --value $unit') -n -m sudo -u $USER -i bash + m sudo nsenter -t $(systemctl show --property MainPID --value $unit) -n -m sudo -u $USER -i bash } mailnnbash() { - m sudo nsenter -t $(systemctl show --property MainPID --value mailnn') -n -m sudo -u $USER -i bash + m sudo nsenter -t $(systemctl show --property MainPID --value mailnn) -n -m sudo -u $USER -i bash } mailvpnbash() { m sudo nsenter -t $(pgrep -f "/usr/sbin/openvpn .* --config /etc/openvpn/.*mail.conf") -n -m sudo -u $USER -i bash } eximbash() { - m sudo nsenter -t $(pgrep -f "/usr/sbin/exim4 -bd -q30m -C /etc/exim4/my.conf"|h1) -n -m sudo -u $USER -i bash + local pid + pid=$(pgrep -f "/usr/sbin/exim4 -bd -q30m -C /etc/exim4/my.conf"|h1) + if [[ ! $pid ]]; then + echo "eximbash: failed to find exim pid. systemctl -n 30 status exim4:" + systemctl status exim4 + fi + m sudo nsenter -t $pid -n -m } spamnn() { local spamdpid @@ -1741,7 +1747,7 @@ vpn() { sudo systemd-tty-ask-password-agent } -ufix() { +fixu() { ls -lad /run/user/1000 s chmod 700 /run/user/1000; s chown iank.iank /run/user/1000 }