aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:06:28 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:42:03 +1200
commit09286dd29ec1cbee1d0c3abd7ebeba513561b52e (patch)
treeffec85067d4382f5539f9935e86c5df04b9383ae
parentNo need to quote var in case statement (diff)
downloadpsshd-09286dd29ec1cbee1d0c3abd7ebeba513561b52e.tar.gz
psshd-09286dd29ec1cbee1d0c3abd7ebeba513561b52e.zip
No need to quote in variable assignment
-rwxr-xr-xpsshd8
1 files changed, 4 insertions, 4 deletions
diff --git a/psshd b/psshd
index c963d4c..0351ad4 100755
--- a/psshd
+++ b/psshd
@@ -33,7 +33,7 @@ done
while getopts ':p:' opt; do
case $opt in
p)
- port="$OPTARG"
+ port=$OPTARG
;;
\?)
printf "Invalid option $OPTARG\n" >&2
@@ -54,15 +54,15 @@ if ! [[ "$port" ]]; then
fi
# Set up a PID dir
-dir="${TMPDIR:-/tmp}/psshd-${UID}"
+dir=${TMPDIR:-/tmp}/psshd-${UID}
if ! mkdir -p "$dir"; then
printf "Couldn't create directory ${dir} for PID file\n" >&2
exit 1
fi
# Export the two settings autossh absolutely needs
-AUTOSSH_PIDFILE="${dir}/psshd-port-${port}.pid"
-AUTOSSH_PORT="$port"
+AUTOSSH_PIDFILE=${dir}/psshd-port-${port}.pid
+AUTOSSH_PORT=$port
export AUTOSSH_PIDFILE AUTOSSH_PORT
# Use start-stop-daemon to run it sanely