summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-01-29 17:00:43 +0100
committertv <tv@nomic.retiolum>2013-01-29 17:00:43 +0100
commit2da96a69e9ab02db32cdafd194ef3e5f87ca71dc (patch)
tree0434da701dd374be863bd805e68bf04f5c2d61fc /services
parent143f844b41e6e7643b523daa8aac0158483da2da (diff)
//services services: use $services_identity_file
Diffstat (limited to 'services')
-rwxr-xr-xservices/bin/services8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/bin/services b/services/bin/services
index 90d3f624..c142a363 100755
--- a/services/bin/services
+++ b/services/bin/services
@@ -1,11 +1,17 @@
#! /bin/sh
# usage: services [user@]hostname[:port]
+# environment:
+# services_identity_file path to ssh(1) identity_file
set -euf
user=services
hostname=${1-localhost}
port=1337
+if test -n "${services_identity_file-}"; then
+ options="${options+$options }-i $services_identity_file"
+fi
+
if echo $hostname | grep -q @; then
user=`echo $hostname | cut -d@ -f1`
hostname=`echo $hostname | cut -d@ -f2`
@@ -15,4 +21,4 @@ if echo $hostname | grep -q :; then
hostname=`echo $hostname | cut -d: -f1`
fi
-ssh $user@$hostname -p $port
+ssh $options $user@$hostname -p $port