diff options
author | Alex Landau <alex.landau@xorcom.com> | 2008-12-28 07:46:06 +0000 |
---|---|---|
committer | Alex Landau <alex.landau@xorcom.com> | 2008-12-28 07:46:06 +0000 |
commit | bfcceffc9b62841da0d48a87aeceead870a5092c (patch) | |
tree | 9209116e6261cd47061d1c78b926d4fb952970f5 /rtadm | |
parent | 01653c7ddffca3d17d6403d733ccb3005f8f2d3b (diff) |
rapid-tunneling:
- Rename comment to connection name.
- Add connection name to invitation .tar.gz filename
git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6498 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'rtadm')
-rwxr-xr-x | rtadm | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -19,7 +19,7 @@ create() COMMENT=$2 if grep -q "ra-[0-9]\+-$COMMENT-[0-9]\+" $HOME/.ssh/authorized_keys 2>/dev/null; then - echo "Comment '$COMMENT' already exists. Aborting." 1>&2 + echo "Connection name '$COMMENT' already exists. Aborting." 1>&2 exit 1 fi if ! [ $TUNNEL_PORT -ge 1024 -a $TUNNEL_PORT -le 65535 ] 2>/dev/null; then @@ -35,7 +35,7 @@ create() echo $PORT > ~/tmp/port echo $USERNAME > ~/tmp/user echo $TUNNEL_PORT > ~/tmp/tunnelport - tar -czf remote-access.tar.gz -C ~/tmp host port user tunnelport key --owner root --group root + tar -czf remote-access-$COMMENT.tar.gz -C ~/tmp host port user tunnelport key --owner root --group root mkdir -m 700 -p ~/.ssh umask 022 cat ~/tmp/key.pub >> ~/.ssh/authorized_keys @@ -109,17 +109,17 @@ usage() exec 1>&2 echo "Usage: $0 <command> [options]" echo "Commands:" - echo " create [-e] <tunnel-port> <comment>" + echo " create [-e] <tunnel-port> <connection-name>" echo " # create invitation tar.gz, if -e specified, enable it" echo " show" echo " # show current connections" - echo " enable <comment>" - echo " disable <comment>" + echo " enable <connection-name>" + echo " disable <connection-name>" echo " # enable/disable future connections" - echo " disconnect <comment>" + echo " disconnect <connection-name>" echo " # disconnect connection" - echo " delete <comment>" - echo " # disconnect and delete any trace of the connection" + echo " delete <connection-name>" + echo " # disconnect, disable and delete any trace of the connection" exit 1 } |