dot/emacs, el/dot-emacs.el: Update browser configuration.
[profile] / bin / remote-disorder
CommitLineData
a10bf242
MW
1#! /bin/sh -e
2case $# in 1) ;; *) echo >&2 "usage: $0 HOST"; exit 2 ;; esac
3host=$1; shift
4case $host in
5 *[!-a-zA-Z0-9]*) echo >&2 "$0: bad host name \`$host'"; exit 2 ;;
6esac
7cd "$HOME/.disorder"
8if ! [ -f "passwd.$host" ] ||
9 ! grep -q "^connect -unix /.*/\.disorder/sock/disorder@$host" \
10 "passwd.$host"
11then echo >&2 "$0: unknown disorder host \`$host'"; exit 2; fi
12if [ -S "sock/ssh@$host" ]; then
13 ssh -oControlPath="sock/ssh@$host" -Oexit "$host"
14fi
15rm -f "sock/disorder@$host"
16ssh -oControlMaster=yes -oControlPath="sock/ssh@$host" -fnN \
17 -L"sock/disorder@$host:/var/lib/disorder/socket" \
18 "$host"