diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 17:06:28 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 17:42:03 +1200 |
commit | 09286dd29ec1cbee1d0c3abd7ebeba513561b52e (patch) | |
tree | ffec85067d4382f5539f9935e86c5df04b9383ae /psshd | |
parent | No need to quote var in case statement (diff) | |
download | psshd-09286dd29ec1cbee1d0c3abd7ebeba513561b52e.tar.gz psshd-09286dd29ec1cbee1d0c3abd7ebeba513561b52e.zip |
No need to quote in variable assignment
Diffstat (limited to 'psshd')
-rwxr-xr-x | psshd | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |