diff options
-rwxr-xr-x | psshd | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -20,6 +20,16 @@ autossh='/usr/lib/autossh/autossh' # Path to start-stop-daemon binary startstopdaemon='/sbin/start-stop-daemon' +# Neither of those are likely to be in your PATH if you're a normal user, so we +# hardcode the paths and test for their existence +if [[ ! -x "$autossh" ]]; then + printf "Can't execute ${autossh}!" >&2 + exit 1 +elif [[ ! -x "$startstopdaemon" ]]; then + printf "Can't execute ${startstopdaemon}!" >&2 + exit 1 +fi + # Set up a PID dir dir="${TMPDIR:-/tmp}/psshd-${UID}" mkdir -p "$dir" |