test_require_executables "ssh-keygen"
missing_executables="$result"
-ssh-keygen -q -t rsa -b 2048 -N "" -f $privkey
-key_gen_result=$?
+if [[ -z "$missing_objects" && -z "$missing_executables" ]]; then
+ ssh-keygen -q -t rsa -b 2048 -N "" -f $privkey
+ key_gen_result=$?
-read &>/dev/null < /dev/tcp/localhost/$port
-check_port_result=$?
+ read &>/dev/null < /dev/tcp/localhost/$port
+ check_port_result=$?
-cat > $user_list << EOF
-user $LOGNAME $pubkey AFS_READ,AFS_WRITE,VSS_READ,VSS_WRITE
+ cat > $user_list << EOF
+ user $LOGNAME $pubkey AFS_READ,AFS_WRITE,VSS_READ,VSS_WRITE
EOF
-# para_server sends this signal to all processes in the current process group.
-trap "" SIGUSR1
-
-$PARA_SERVER \
- --logfile "$serverlog" \
- --config_file /dev/null \
- --daemon \
- --loglevel $loglevel \
- --port $port \
- --afs_database_dir "$db" \
- --afs_socket "$sock" \
- --user_list "$user_list" \
- --http_port "$stream_port" \
- --dccp_port "$stream_port"
+ # para_server sends this signal to all processes in the current process group.
+ trap "" SIGUSR1
+
+
+ $PARA_SERVER \
+ --logfile "$serverlog" \
+ --config_file /dev/null \
+ --daemon \
+ --loglevel $loglevel \
+ --port $port \
+ --afs_database_dir "$db" \
+ --afs_socket "$sock" \
+ --user_list "$user_list" \
+ --http_port "$stream_port" \
+ --dccp_port "$stream_port"
+fi
for ((i=0; i < ${#commands[@]}; i++)); do
command=${commands[$i]}